mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
parent
0f24a01677
commit
752793264b
@ -23,8 +23,13 @@ func GetBlockNumber(blockNrOrHash rpc.BlockNumberOrHash, dbReader rawdb.Database
|
||||
if err != nil {
|
||||
return 0, common.Hash{}, fmt.Errorf("getting latest block number: %v", err)
|
||||
}
|
||||
} else if number == rpc.PendingBlockNumber || number == rpc.EarliestBlockNumber {
|
||||
return 0, common.Hash{}, fmt.Errorf("pending and earliest blocks are not supported")
|
||||
|
||||
} else if number == rpc.EarliestBlockNumber {
|
||||
blockNumber = 0
|
||||
|
||||
} else if number == rpc.PendingBlockNumber {
|
||||
return 0, common.Hash{}, fmt.Errorf("pending blocks are not supported")
|
||||
|
||||
} else {
|
||||
blockNumber = uint64(number.Int64())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user