internal/ethapi: remove globalGasCap param from apply message

This commit is contained in:
Manav Darji 2025-03-26 02:06:40 +05:30
parent e1fcdd4f83
commit c58647a932
No known key found for this signature in database
GPG key ID: A426F0124435F36E

View file

@ -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() {