Skip to content

Commit

Permalink
eth/tracers/logger: fix flaw hiding scope output, introduced in ether…
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Nov 25, 2024
1 parent 5e1a39d commit 45eb561
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions eth/tracers/logger/logger_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewJSONLogger(cfg *Config, writer io.Writer) *tracing.Hooks {
l.hooks = &tracing.Hooks{
OnTxStart: l.OnTxStart,
OnSystemCallStart: l.onSystemCallStart,
OnExit: l.OnEnd,
OnExit: l.OnExit,
OnOpcode: l.OnOpcode,
OnFault: l.OnFault,
}
Expand Down Expand Up @@ -152,13 +152,6 @@ func (l *jsonLogger) OnEnter(depth int, typ byte, from common.Address, to common
l.encoder.Encode(frame)
}

func (l *jsonLogger) OnEnd(depth int, output []byte, gasUsed uint64, err error, reverted bool) {
if depth > 0 {
return
}
l.OnExit(depth, output, gasUsed, err, false)
}

func (l *jsonLogger) OnExit(depth int, output []byte, gasUsed uint64, err error, reverted bool) {
type endLog struct {
Output string `json:"output"`
Expand Down

0 comments on commit 45eb561

Please sign in to comment.