Block 0 is valid in queries (#8891)
Early exit for block nr 0 leads to spurious error about pruning: `…your node is running with state pruning…`. Fixes #7547, #8762
This commit is contained in:
parent
24c2b8e3f6
commit
bdef4b37a5
@ -944,7 +944,8 @@ impl Client {
|
||||
match id {
|
||||
BlockId::Pending => self.state_at(BlockId::Latest),
|
||||
id => match self.block_number(id) {
|
||||
None | Some(0) => None,
|
||||
None => None,
|
||||
Some(0) => self.state_at(id),
|
||||
Some(n) => self.state_at(BlockId::Number(n - 1)),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user