From c58647a932244201ebacbf064d1164173a0f7df3 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Wed, 26 Mar 2025 02:06:40 +0530 Subject: [PATCH] internal/ethapi: remove globalGasCap param from apply message --- internal/ethapi/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 9afadbe17e..a577b2913a 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -998,9 +998,9 @@ func doCall(ctx context.Context, b Backend, args TransactionArgs, state *state.S return applyMessage(ctx, b, args, state, header, timeout, gp, &blockCtx, &vm.Config{NoBaseFee: true}, precompiles, true) } -func applyMessage(ctx context.Context, b Backend, args TransactionArgs, state *state.StateDB, header *types.Header, timeout time.Duration, globalGasCap uint64, gp *core.GasPool, blockContext *vm.BlockContext, vmConfig *vm.Config, precompiles vm.PrecompiledContracts, skipChecks bool) (*core.ExecutionResult, error) { +func applyMessage(ctx context.Context, b Backend, args TransactionArgs, state *state.StateDB, header *types.Header, timeout time.Duration, gp *core.GasPool, blockContext *vm.BlockContext, vmConfig *vm.Config, precompiles vm.PrecompiledContracts, skipChecks bool) (*core.ExecutionResult, error) { // Get a new instance of the EVM. - if err := args.CallDefaults(globalGasCap, blockContext.BaseFee, b.ChainConfig().ChainID); err != nil { + if err := args.CallDefaults(gp.Gas(), blockContext.BaseFee, b.ChainConfig().ChainID); err != nil { return nil, err } msg := args.ToMessage(header.BaseFee, skipChecks, skipChecks) @@ -1034,7 +1034,7 @@ func applyMessageWithEVM(ctx context.Context, evm *vm.EVM, msg *core.Message, ti }() // Execute the message. - result, err := core.ApplyMessage(evm, msg, gp) + result, err := core.ApplyMessage(evm, msg, gp, context.Background()) // If the timer caused an abort, return an appropriate error message if evm.Cancelled() {