Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Block 0 is valid in queries (#8891)
Browse files Browse the repository at this point in the history
Early exit for block nr 0 leads to spurious error about pruning: `…your node is running with state pruning…`.

Fixes #7547, #8762
  • Loading branch information
dvdplm authored and ascjones committed Jun 18, 2018
1 parent 24c2b8e commit bdef4b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
}
}
Expand Down

0 comments on commit bdef4b3

Please sign in to comment.