chain-api: stop ancestors lookup at block #0 (#4560)

This commit is contained in:
Chris Sosnin
2021-12-18 17:50:08 +03:00
committed by GitHub
parent 686d82a437
commit 5e80287475
3 changed files with 35 additions and 3 deletions
@@ -558,7 +558,8 @@ pub enum ChainApiMessage {
/// Request the `k` ancestors block hashes of a block with the given hash.
/// The response channel may return a `Vec` of size up to `k`
/// filled with ancestors hashes with the following order:
/// `parent`, `grandparent`, ...
/// `parent`, `grandparent`, ... up to the hash of genesis block
/// with number 0, including it.
Ancestors {
/// The hash of the block in question.
hash: Hash,