Skip to content

Commit 182e08a

Browse files
authored
t8ntool/file_tracer: proxy OnFaultV2 in writer wrapper
1 parent 99923e9 commit 182e08a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/evm/internal/t8ntool/file_tracer.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ func (l *fileWritingTracer) hooks() *tracing.Hooks {
138138
l.inner.OnFault(pc, op, gas, cost, scope, depth, err)
139139
}
140140
},
141+
OnFaultV2: func(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error) {
142+
if l.inner != nil {
143+
if l.inner.OnFaultV2 != nil {
144+
l.inner.OnFaultV2(pc, op, gas, cost, scope, rData, depth, err)
145+
} else if l.inner.OnFault != nil {
146+
l.inner.OnFault(pc, op, gas, cost, scope, depth, err)
147+
}
148+
}
149+
},
141150
OnSystemCallStart: func() {
142151
if l.inner != nil && l.inner.OnSystemCallStart != nil {
143152
l.inner.OnSystemCallStart()

0 commit comments

Comments
 (0)