Skip to content

Commit

Permalink
eth/tracers: abort evm execution when trace is aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Sep 15, 2021
1 parent b8d7c66 commit a2ca26e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/tracers/tracer.go
Expand Up @@ -600,6 +600,7 @@ func (jst *Tracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost
// If tracing was interrupted, set the error and stop
if atomic.LoadUint32(&jst.interrupt) > 0 {
jst.err = jst.reason
env.Cancel()
return
}
jst.opWrapper.op = op
Expand Down Expand Up @@ -643,7 +644,6 @@ func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, er
jst.ctx["output"] = output
jst.ctx["time"] = t.String()
jst.ctx["gasUsed"] = gasUsed

if err != nil {
jst.ctx["error"] = err.Error()
}
Expand Down

0 comments on commit a2ca26e

Please sign in to comment.