mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
native/mux: forward OnFaultV2 to child tracers with fallback
This commit is contained in:
parent
bf35a2f113
commit
99923e9f54
1 changed files with 11 additions and 0 deletions
|
|
@ -64,6 +64,7 @@ func newMuxTracer(ctx *tracers.Context, cfg json.RawMessage, chainConfig *params
|
|||
OnExit: t.OnExit,
|
||||
OnOpcode: t.OnOpcode,
|
||||
OnFault: t.OnFault,
|
||||
OnFaultV2: t.OnFaultV2,
|
||||
OnGasChange: t.OnGasChange,
|
||||
OnBalanceChange: t.OnBalanceChange,
|
||||
OnNonceChange: t.OnNonceChange,
|
||||
|
|
@ -92,6 +93,16 @@ func (t *muxTracer) OnFault(pc uint64, op byte, gas, cost uint64, scope tracing.
|
|||
}
|
||||
}
|
||||
|
||||
func (t *muxTracer) OnFaultV2(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error) {
|
||||
for _, t := range t.tracers {
|
||||
if t.OnFaultV2 != nil {
|
||||
t.OnFaultV2(pc, op, gas, cost, scope, rData, depth, err)
|
||||
} else if t.OnFault != nil {
|
||||
t.OnFault(pc, op, gas, cost, scope, depth, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *muxTracer) OnGasChange(old, new uint64, reason tracing.GasChangeReason) {
|
||||
for _, t := range t.tracers {
|
||||
if t.OnGasChange != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue