From 5db5e5d8178bfe02a0a546b50aa206bf32e382ad Mon Sep 17 00:00:00 2001 From: Lucca Martins Date: Tue, 4 Feb 2025 15:14:46 -0300 Subject: [PATCH] keep gp to call always max --- internal/ethapi/api.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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) }