From 2cc09548bb86736718ff4c897c1b30e495ac31a6 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 6 Feb 2024 17:33:18 +0100 Subject: [PATCH] rename --- eth/tracers/live/noop.go | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/eth/tracers/live/noop.go b/eth/tracers/live/noop.go index 8e94e7ddcd..822fbbaea3 100644 --- a/eth/tracers/live/noop.go +++ b/eth/tracers/live/noop.go @@ -13,86 +13,86 @@ import ( ) func init() { - directory.LiveDirectory.Register("liveNoop", newLiveNoopTracer) + directory.LiveDirectory.Register("noop", newNoopTracer) } -// liveNoop is a no-op live tracer. It's there to +// noop is a no-op live tracer. It's there to // catch changes in the tracing interface, as well as // for testing live tracing performance. Can be removed // as soon as we have a real live tracer. -type liveNoop struct{} +type noop struct{} -func newLiveNoopTracer() (core.BlockchainLogger, error) { - return &liveNoop{}, nil +func newNoopTracer() (core.BlockchainLogger, error) { + return &noop{}, nil } // CaptureStart implements the EVMLogger interface to initialize the tracing operation. -func (t *liveNoop) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { +func (t *noop) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { } // CaptureEnd is called after the call finishes to finalize the tracing. -func (t *liveNoop) CaptureEnd(output []byte, gasUsed uint64, err error, reverted bool) { +func (t *noop) CaptureEnd(output []byte, gasUsed uint64, err error, reverted bool) { } // CaptureState implements the EVMLogger interface to trace a single step of VM execution. -func (t *liveNoop) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { +func (t *noop) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { } // CaptureFault implements the EVMLogger interface to trace an execution fault. -func (t *liveNoop) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, _ *vm.ScopeContext, depth int, err error) { +func (t *noop) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, _ *vm.ScopeContext, depth int, err error) { } // CaptureKeccakPreimage is called during the KECCAK256 opcode. -func (t *liveNoop) CaptureKeccakPreimage(hash common.Hash, data []byte) {} +func (t *noop) CaptureKeccakPreimage(hash common.Hash, data []byte) {} // CaptureEnter is called when EVM enters a new scope (via call, create or selfdestruct). -func (t *liveNoop) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +func (t *noop) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { } // CaptureExit is called when EVM exits a scope, even if the scope didn't // execute any code. -func (t *liveNoop) CaptureExit(output []byte, gasUsed uint64, err error, reverted bool) { +func (t *noop) CaptureExit(output []byte, gasUsed uint64, err error, reverted bool) { } -func (t *liveNoop) OnBeaconBlockRootStart(root common.Hash) {} -func (t *liveNoop) OnBeaconBlockRootEnd() {} +func (t *noop) OnBeaconBlockRootStart(root common.Hash) {} +func (t *noop) OnBeaconBlockRootEnd() {} -func (t *liveNoop) CaptureTxStart(env *vm.EVM, tx *types.Transaction, from common.Address) { +func (t *noop) CaptureTxStart(env *vm.EVM, tx *types.Transaction, from common.Address) { } -func (t *liveNoop) CaptureTxEnd(receipt *types.Receipt, err error) { +func (t *noop) CaptureTxEnd(receipt *types.Receipt, err error) { } -func (t *liveNoop) OnBlockStart(b *types.Block, td *big.Int, finalized, safe *types.Header) { +func (t *noop) OnBlockStart(b *types.Block, td *big.Int, finalized, safe *types.Header) { } -func (t *liveNoop) OnBlockEnd(err error) { +func (t *noop) OnBlockEnd(err error) { } -func (t *liveNoop) OnBlockchainInit(chainConfig *params.ChainConfig) { +func (t *noop) OnBlockchainInit(chainConfig *params.ChainConfig) { } -func (t *liveNoop) OnGenesisBlock(b *types.Block, alloc core.GenesisAlloc) { +func (t *noop) OnGenesisBlock(b *types.Block, alloc core.GenesisAlloc) { } -func (t *liveNoop) OnBalanceChange(a common.Address, prev, new *big.Int, reason state.BalanceChangeReason) { +func (t *noop) OnBalanceChange(a common.Address, prev, new *big.Int, reason state.BalanceChangeReason) { } -func (t *liveNoop) OnNonceChange(a common.Address, prev, new uint64) { +func (t *noop) OnNonceChange(a common.Address, prev, new uint64) { } -func (t *liveNoop) OnCodeChange(a common.Address, prevCodeHash common.Hash, prev []byte, codeHash common.Hash, code []byte) { +func (t *noop) OnCodeChange(a common.Address, prevCodeHash common.Hash, prev []byte, codeHash common.Hash, code []byte) { } -func (t *liveNoop) OnStorageChange(a common.Address, k, prev, new common.Hash) { +func (t *noop) OnStorageChange(a common.Address, k, prev, new common.Hash) { } -func (t *liveNoop) OnLog(l *types.Log) { +func (t *noop) OnLog(l *types.Log) { } -func (t *liveNoop) OnNewAccount(a common.Address, reset bool) { +func (t *noop) OnNewAccount(a common.Address, reset bool) { } -func (t *liveNoop) OnGasChange(old, new uint64, reason vm.GasChangeReason) { +func (t *noop) OnGasChange(old, new uint64, reason vm.GasChangeReason) { }