Skip to content

Commit dd32b78

Browse files
Merge pull request #393 from OffchainLabs/fix_flatCallTracer_onexit
fix flatCallTracer onexit out of bound
2 parents be92342 + bd8e6ed commit dd32b78

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: eth/tracers/native/call_flat.go

+3
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ func (t *flatCallTracer) OnExit(depth int, output []byte, gasUsed uint64, err er
195195
if t.config.IncludePrecompiles {
196196
return
197197
}
198+
if len(t.tracer.callstack[len(t.tracer.callstack)-1].Calls) == 0 {
199+
return
200+
}
198201
var (
199202
// call has been nested in parent
200203
parent = t.tracer.callstack[len(t.tracer.callstack)-1]

0 commit comments

Comments
 (0)