mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Inverted wrong logic to apply beacon root in TraceCall
This commit is contained in:
parent
599c461cad
commit
c9c894c07a
1 changed files with 2 additions and 1 deletions
|
|
@ -945,7 +945,8 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
|
||||||
}
|
}
|
||||||
defer release()
|
defer release()
|
||||||
|
|
||||||
if config != nil && config.TxIndex != nil {
|
// Apply only when we have used StateAtBlock since `StateAtTransaction` already handles the beacon root
|
||||||
|
if config == nil || config.TxIndex == nil {
|
||||||
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
|
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
|
||||||
context := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
|
context := core.NewEVMBlockContext(block.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{})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue