diff --git a/eth/gasestimator/gasestimator.go b/eth/gasestimator/gasestimator.go index 04c0fed82c..9dacb074e0 100644 --- a/eth/gasestimator/gasestimator.go +++ b/eth/gasestimator/gasestimator.go @@ -262,6 +262,7 @@ func run(ctx context.Context, call *core.Message, opts *Options) (*core.Executio // context for the lifetime of this method call. ctx, cancel := context.WithCancel(ctx) defer cancel() + context.AfterFunc(ctx, evm.Cancel) // Execute the call, returning a wrapped error or the result result, err := core.ApplyMessage(evm, call, new(core.GasPool).AddGas(math.MaxUint64))