mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
fix traceChain beacon root
This commit is contained in:
parent
c9c894c07a
commit
43b91b39f6
1 changed files with 5 additions and 6 deletions
|
|
@ -376,14 +376,13 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed
|
||||||
failed = err
|
failed = err
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
// Insert block's parent beacon block root in the state
|
||||||
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
|
// as per EIP-4788.
|
||||||
context := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
|
if beaconRoot := next.BeaconRoot(); beaconRoot != nil {
|
||||||
|
context := core.NewEVMBlockContext(next.Header(), api.chainContext(ctx), nil)
|
||||||
vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{})
|
vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{})
|
||||||
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb)
|
||||||
core.ProcessBeaconBlockRoot(*block.BeaconRoot(), vmenv, statedb)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean out any pending release functions of trace state. Note this
|
// Clean out any pending release functions of trace state. Note this
|
||||||
// step must be done after constructing tracing state, because the
|
// step must be done after constructing tracing state, because the
|
||||||
// tracing state of block next depends on the parent state and construction
|
// tracing state of block next depends on the parent state and construction
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue