mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: simplify accountRangeAt
This commit is contained in:
parent
407ff0f945
commit
a32c95b156
1 changed files with 1 additions and 5 deletions
|
|
@ -378,11 +378,7 @@ func (api *PrivateDebugAPI) AccountRangeAt(ctx context.Context, start *common.Ha
|
||||||
block := api.eth.blockchain.CurrentBlock()
|
block := api.eth.blockchain.CurrentBlock()
|
||||||
|
|
||||||
if len(block.Transactions()) == 0 {
|
if len(block.Transactions()) == 0 {
|
||||||
parent := api.eth.blockchain.GetBlock(block.ParentHash(), block.NumberU64()-1)
|
statedb, err = api.computeStateDB(block, defaultTraceReexec)
|
||||||
if parent == nil {
|
|
||||||
return AccountRangeResult{}, fmt.Errorf("parent %x not found", block.ParentHash())
|
|
||||||
}
|
|
||||||
statedb, err = api.computeStateDB(parent, defaultTraceReexec)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return AccountRangeResult{}, err
|
return AccountRangeResult{}, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue