diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index b6864fc81c..9cd642a10e 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1352,12 +1352,7 @@ func doCall(ctx context.Context, b Backend, args TransactionArgs, state *state.S // Make sure the context is cancelled when the call has completed // this makes sure resources are cleaned up. defer cancel() - gp := new(core.GasPool) - if globalGasCap == 0 { - gp.AddGas(math.MaxUint64) - } else { - gp.AddGas(globalGasCap) - } + gp := new(core.GasPool).AddGas(math.MaxUint64) return applyMessage(ctx, b, args, state, header, timeout, gp, &blockCtx, &vm.Config{NoBaseFee: true}, precompiles, true) }