forked from cerc-io/plugeth
eth/tracers: add multiplexing tracer (#26086)
* eth/tracers: add native multiplexing tracer * minor improv callTracer * mv evm cancellation to api
This commit is contained in:
@@ -47,7 +47,6 @@ func init() {
|
||||
// 0xc281d19e-0: 1
|
||||
// }
|
||||
type fourByteTracer struct {
|
||||
env *vm.EVM
|
||||
ids map[string]int // ids aggregates the 4byte ids found
|
||||
interrupt uint32 // Atomic flag to signal execution interruption
|
||||
reason error // Textual reason for the interruption
|
||||
@@ -81,8 +80,6 @@ func (t *fourByteTracer) store(id []byte, size int) {
|
||||
|
||||
// CaptureStart implements the EVMLogger interface to initialize the tracing operation.
|
||||
func (t *fourByteTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) {
|
||||
t.env = env
|
||||
|
||||
// Update list of precompiles based on current block
|
||||
rules := env.ChainConfig().Rules(env.Context.BlockNumber, env.Context.Random != nil)
|
||||
t.activePrecompiles = vm.ActivePrecompiles(rules)
|
||||
@@ -101,7 +98,6 @@ func (t *fourByteTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64,
|
||||
func (t *fourByteTracer) CaptureEnter(op vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
|
||||
// Skip if tracing was interrupted
|
||||
if atomic.LoadUint32(&t.interrupt) > 0 {
|
||||
t.env.Cancel()
|
||||
return
|
||||
}
|
||||
if len(input) < 4 {
|
||||
|
||||
Reference in New Issue
Block a user