mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
rpc: change constant value for "earliest" block
With history pruning, we want to redefine what the "earliest" block tag means. We need to assign a special negative integer value to this constant, otherwise we cannot tell it apart from block zero, the genesis block.
This commit is contained in:
parent
5606cbc710
commit
aef13d8174
1 changed files with 1 additions and 1 deletions
|
|
@ -63,11 +63,11 @@ type jsonWriter interface {
|
|||
type BlockNumber int64
|
||||
|
||||
const (
|
||||
EarliestBlockNumber = BlockNumber(-5)
|
||||
SafeBlockNumber = BlockNumber(-4)
|
||||
FinalizedBlockNumber = BlockNumber(-3)
|
||||
LatestBlockNumber = BlockNumber(-2)
|
||||
PendingBlockNumber = BlockNumber(-1)
|
||||
EarliestBlockNumber = BlockNumber(0)
|
||||
)
|
||||
|
||||
// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports:
|
||||
|
|
|
|||
Loading…
Reference in a new issue