mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
native/callflat: register parity tracer
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
b759f84cf9
commit
efa411ffb7
1 changed files with 6 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ import (
|
|||
|
||||
func init() {
|
||||
tracers.DefaultDirectory.Register("flatCallTracer", newFlatCallTracer, false)
|
||||
tracers.DefaultDirectory.Register("parityTracer", newParityTracer, false)
|
||||
}
|
||||
|
||||
var parityErrorMapping = map[string]string{
|
||||
|
|
@ -153,6 +154,11 @@ func newFlatCallTracer(ctx *tracers.Context, cfg json.RawMessage) (*tracers.Trac
|
|||
}, nil
|
||||
}
|
||||
|
||||
// newParityTracer returns a new flatCallTracer with parity style.
|
||||
func newParityTracer(ctx *tracers.Context, _ json.RawMessage) (*tracers.Tracer, error) {
|
||||
return newFlatCallTracer(ctx, []byte(`{"includePrecompiles": true, "convertParityErrors": true}`))
|
||||
}
|
||||
|
||||
// OnEnter is called when EVM enters a new scope (via call, create or selfdestruct).
|
||||
func (t *flatCallTracer) OnEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
|
||||
if t.interrupt.Load() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue