diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 8467fb323..f371d7b54 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -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) } diff --git a/eth/tracers/native/call_flat.go b/eth/tracers/native/call_flat.go index a51af560d..b1baf0ade 100644 --- a/eth/tracers/native/call_flat.go +++ b/eth/tracers/native/call_flat.go @@ -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]