diff --git a/core/state_processor.go b/core/state_processor.go index 894ae0b36042..0ccff3f4193f 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -238,11 +238,11 @@ func ApplyTransactionWithEVM( func ApplyTransactionWithEVMWithResult( vmenv *vm.EVM, config *params.ChainConfig, gp *GasPool, statedb state.StateDBI, - header *types.Header, tx *types.Transaction, usedGas *uint64, + baseFee *big.Int, blockNumber *big.Int, blockHash common.Hash, tx *types.Transaction, usedGas *uint64, ) (*types.Receipt, *ExecutionResult, error) { - msg, err := TransactionToMessage(tx, types.MakeSigner(config, header.Number), header.BaseFee) + msg, err := TransactionToMessage(tx, types.MakeSigner(config, blockNumber), baseFee) if err != nil { return nil, nil, err } - return applyTransactionWithResult(vmenv, msg, config, gp, statedb, header.Number, header.Hash(), tx, usedGas) + return applyTransactionWithResult(vmenv, msg, config, gp, statedb, blockNumber, blockHash, tx, usedGas) } diff --git a/ethapi/api.go b/ethapi/api.go index 6aa82c8cb291..418417f404a3 100644 --- a/ethapi/api.go +++ b/ethapi/api.go @@ -2201,6 +2201,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st Coinbase: coinbase, BaseFee: baseFee, } + blockHash := header.Hash() // Setup context so it may be cancelled the call has completed // or, in case of unmetered gas, setup a context with a timeout. @@ -2241,7 +2242,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st state.SetTxContext(tx.Hash(), i) receipt, result, err := core.ApplyTransactionWithEVMWithResult( - vmenv, s.b.ChainConfig(), gp, state, header, tx, &header.GasUsed, + vmenv, s.b.ChainConfig(), gp, state, header.BaseFee, header.Number, blockHash, tx, &header.GasUsed, ) if err != nil { return nil, fmt.Errorf("err: %w; txhash %s", err, tx.Hash())