mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
eth/api: fix potential nil deref in AccountRange (#21710)
* Fix potential nil pointer error when neither block number nor hash is specified to accountRange * Update error description # Conflicts: # eth/api.go
This commit is contained in:
parent
8b493c2895
commit
07aefb98c3
@ -366,6 +366,7 @@ func (api *PublicDebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, sta
|
||||
if block == nil {
|
||||
return state.IteratorDump{}, fmt.Errorf("block %s not found", hash.Hex())
|
||||
}
|
||||
} else {
|
||||
blockNumber = block.NumberU64()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user