eth, les: properly init statedb accesslist during tracing (#22480)

* eth/state, les/state: properly init statedb accesslist when tracing, fixes #22475

* eth: review comments

* eth/tracers: fix compilation err

* eth/tracers: apply @karalabe's suggested fix
This commit is contained in:
Martin Holst Swende
2021-03-14 16:13:25 +01:00
committed by GitHub
parent 3f74c8e0e5
commit c6d45009f1
3 changed files with 38 additions and 9 deletions

View File

@ -72,6 +72,7 @@ func (leth *LightEthereum) stateAtTransaction(ctx context.Context, block *types.
msg, _ := tx.AsMessage(signer)
txContext := core.NewEVMTxContext(msg)
context := core.NewEVMBlockContext(block.Header(), leth.blockchain, nil)
statedb.Prepare(tx.Hash(), block.Hash(), idx)
if idx == txIndex {
return msg, context, statedb, func() {}, nil
}