mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
vm: emit OnFaultV2 with revert return data; fallback to OnFault
This commit is contained in:
parent
17d313747d
commit
bf35a2f113
1 changed files with 6 additions and 2 deletions
|
|
@ -155,9 +155,13 @@ func (evm *EVM) Run(contract *Contract, input []byte, readOnly bool) (ret []byte
|
||||||
if !logged && evm.Config.Tracer.OnOpcode != nil {
|
if !logged && evm.Config.Tracer.OnOpcode != nil {
|
||||||
evm.Config.Tracer.OnOpcode(pcCopy, byte(op), gasCopy, cost, callContext, evm.returnData, evm.depth, VMErrorFromErr(err))
|
evm.Config.Tracer.OnOpcode(pcCopy, byte(op), gasCopy, cost, callContext, evm.returnData, evm.depth, VMErrorFromErr(err))
|
||||||
}
|
}
|
||||||
if logged && evm.Config.Tracer.OnFault != nil {
|
if logged {
|
||||||
|
if evm.Config.Tracer.OnFaultV2 != nil {
|
||||||
|
evm.Config.Tracer.OnFaultV2(pcCopy, byte(op), gasCopy, cost, callContext, evm.returnData, evm.depth, VMErrorFromErr(err))
|
||||||
|
} else if evm.Config.Tracer.OnFault != nil {
|
||||||
evm.Config.Tracer.OnFault(pcCopy, byte(op), gasCopy, cost, callContext, evm.depth, VMErrorFromErr(err))
|
evm.Config.Tracer.OnFault(pcCopy, byte(op), gasCopy, cost, callContext, evm.depth, VMErrorFromErr(err))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
// The Interpreter main run loop (contextual). This loop runs until either an
|
// The Interpreter main run loop (contextual). This loop runs until either an
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue