mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
tracing: add OnFaultV2 hook with rData to FaultHookV2 and Hooks
This commit is contained in:
parent
5dd0fe2f53
commit
17d313747d
1 changed files with 7 additions and 0 deletions
|
|
@ -113,6 +113,12 @@ type (
|
||||||
// FaultHook is invoked when an error occurs during the execution of an opcode.
|
// FaultHook is invoked when an error occurs during the execution of an opcode.
|
||||||
FaultHook = func(pc uint64, op byte, gas, cost uint64, scope OpContext, depth int, err error)
|
FaultHook = func(pc uint64, op byte, gas, cost uint64, scope OpContext, depth int, err error)
|
||||||
|
|
||||||
|
// FaultHookV2 is invoked when an error occurs during the execution of an opcode.
|
||||||
|
// It includes the return data (e.g. revert reason) available at the time of the fault.
|
||||||
|
// This mirrors the signature of OpcodeHook by including rData and allows tracers to
|
||||||
|
// capture revert data directly at fault time.
|
||||||
|
FaultHookV2 = func(pc uint64, op byte, gas, cost uint64, scope OpContext, rData []byte, depth int, err error)
|
||||||
|
|
||||||
// GasChangeHook is invoked when the gas changes.
|
// GasChangeHook is invoked when the gas changes.
|
||||||
GasChangeHook = func(old, new uint64, reason GasChangeReason)
|
GasChangeHook = func(old, new uint64, reason GasChangeReason)
|
||||||
|
|
||||||
|
|
@ -198,6 +204,7 @@ type Hooks struct {
|
||||||
OnExit ExitHook
|
OnExit ExitHook
|
||||||
OnOpcode OpcodeHook
|
OnOpcode OpcodeHook
|
||||||
OnFault FaultHook
|
OnFault FaultHook
|
||||||
|
OnFaultV2 FaultHookV2
|
||||||
OnGasChange GasChangeHook
|
OnGasChange GasChangeHook
|
||||||
// Chain events
|
// Chain events
|
||||||
OnBlockchainInit BlockchainInitHook
|
OnBlockchainInit BlockchainInitHook
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue