keep gp to call always max

This commit is contained in:
Lucca Martins 2025-02-04 15:14:46 -03:00
parent af4a29d20a
commit 5db5e5d817
No known key found for this signature in database
GPG key ID: DC3D7F76BDAE23BF

View file

@ -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 // Make sure the context is cancelled when the call has completed
// this makes sure resources are cleaned up. // this makes sure resources are cleaned up.
defer cancel() defer cancel()
gp := new(core.GasPool) gp := new(core.GasPool).AddGas(math.MaxUint64)
if globalGasCap == 0 {
gp.AddGas(math.MaxUint64)
} else {
gp.AddGas(globalGasCap)
}
return applyMessage(ctx, b, args, state, header, timeout, gp, &blockCtx, &vm.Config{NoBaseFee: true}, precompiles, true) return applyMessage(ctx, b, args, state, header, timeout, gp, &blockCtx, &vm.Config{NoBaseFee: true}, precompiles, true)
} }