Skip to content

Commit ab4a1cc

Browse files
authored
eth/tracers/logger: fix json-logger output missing (#30804)
Fixes a flaw introduced in #29795 , discovered while reviewing #30633 .
1 parent 5e1a39d commit ab4a1cc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

eth/tracers/logger/logger_json.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func NewJSONLogger(cfg *Config, writer io.Writer) *tracing.Hooks {
7171
l.hooks = &tracing.Hooks{
7272
OnTxStart: l.OnTxStart,
7373
OnSystemCallStart: l.onSystemCallStart,
74-
OnExit: l.OnEnd,
74+
OnExit: l.OnExit,
7575
OnOpcode: l.OnOpcode,
7676
OnFault: l.OnFault,
7777
}
@@ -152,13 +152,6 @@ func (l *jsonLogger) OnEnter(depth int, typ byte, from common.Address, to common
152152
l.encoder.Encode(frame)
153153
}
154154

155-
func (l *jsonLogger) OnEnd(depth int, output []byte, gasUsed uint64, err error, reverted bool) {
156-
if depth > 0 {
157-
return
158-
}
159-
l.OnExit(depth, output, gasUsed, err, false)
160-
}
161-
162155
func (l *jsonLogger) OnExit(depth int, output []byte, gasUsed uint64, err error, reverted bool) {
163156
type endLog struct {
164157
Output string `json:"output"`

0 commit comments

Comments
 (0)