Skip to content

Commit

Permalink
eth/tracers/logger: fix json-logger output missing (#30804)
Browse files Browse the repository at this point in the history
Fixes a flaw introduced in
#29795 , discovered while
reviewing #30633 .
  • Loading branch information
holiman authored Nov 25, 2024
1 parent 5e1a39d commit ab4a1cc
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 ab4a1cc

Please sign in to comment.