eth/tracers: fix flatCallTracer crasher (#27304)

FlatCallTracer had a crasher when it was passed `onlyTopCall: true` as config.
This PR ignores config fields inherited from the normal call tracer.
This commit is contained in:
minh-bq
2023-05-23 11:02:50 +02:00
committed by GitHub
parent 5b792e0fdf
commit a190da9d68
2 changed files with 103 additions and 1 deletions
+3 -1
View File
@@ -129,7 +129,9 @@ func newFlatCallTracer(ctx *tracers.Context, cfg json.RawMessage) (tracers.Trace
}
}
tracer, err := tracers.DefaultDirectory.New("callTracer", ctx, cfg)
// Create inner call tracer with default configuration, don't forward
// the OnlyTopCall or WithLog to inner for now
tracer, err := tracers.DefaultDirectory.New("callTracer", ctx, nil)
if err != nil {
return nil, err
}