eth, les: fix tracers (#22473)

* eth, les: fix tracer

* eth: isolate live trie database in tracer

* eth: fix nil

* eth: fix

* eth, les: add checkLive param

* eth/tracer: fix
This commit is contained in:
gary rong
2021-04-07 15:30:26 +08:00
committed by GitHub
parent 2d89fe0883
commit a600dab7e5
7 changed files with 156 additions and 242 deletions

View File

@ -407,11 +407,10 @@ func (api *PrivateDebugAPI) StorageRangeAt(blockHash common.Hash, txIndex int, c
if block == nil {
return StorageRangeResult{}, fmt.Errorf("block %#x not found", blockHash)
}
_, _, statedb, release, err := api.eth.stateAtTransaction(block, txIndex, 0)
_, _, statedb, err := api.eth.stateAtTransaction(block, txIndex, 0)
if err != nil {
return StorageRangeResult{}, err
}
defer release()
st := statedb.StorageTrie(contractAddress)
if st == nil {
return StorageRangeResult{}, fmt.Errorf("account %x doesn't exist", contractAddress)