@ -1181,7 +1181,13 @@ 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 ( )
return applyMessage ( ctx , b , args , state , header , timeout , new ( core . GasPool ) . AddGas ( globalGasCap ) , & blockCtx , & vm . Config { NoBaseFee : true } , precompiles , true )
gp := new ( core . GasPool )
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 )
}
}
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 ) {
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 ) {