Skip to content

Commit

Permalink
Merge pull request #394 from OffchainLabs/flatcalltracer
Browse files Browse the repository at this point in the history
backport #393 to nitro v3.3.x - fix flatCallTracer onexit out of bound
  • Loading branch information
joshuacolvin0 authored Jan 6, 2025
2 parents 3382d27 + 1cb0518 commit a437823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eth/tracers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ func newTestMergedBackend(t *testing.T, n int, gspec *core.Genesis, generator fu
SnapshotLimit: 0,
TrieDirtyDisabled: true, // Archive mode
}
chain, err := core.NewBlockChain(backend.chaindb, cacheConfig, gspec, nil, backend.engine, vm.Config{}, nil, nil)
chain, err := core.NewBlockChain(backend.chaindb, cacheConfig, nil, gspec, nil, backend.engine, vm.Config{}, nil, nil)
if err != nil {
t.Fatalf("failed to create tester chain: %v", err)
}
Expand Down
3 changes: 3 additions & 0 deletions eth/tracers/native/call_flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ func (t *flatCallTracer) OnExit(depth int, output []byte, gasUsed uint64, err er
if t.config.IncludePrecompiles {
return
}
if len(t.tracer.callstack[len(t.tracer.callstack)-1].Calls) == 0 {
return
}
var (
// call has been nested in parent
parent = t.tracer.callstack[len(t.tracer.callstack)-1]
Expand Down

0 comments on commit a437823

Please sign in to comment.