From 467f056483cd1a2c6fd36add0f02b2ba43b4ad0a Mon Sep 17 00:00:00 2001 From: jsvisa Date: Mon, 20 Nov 2023 03:03:17 +0000 Subject: [PATCH] cmd/evm: use tracers.Trace instead of vm.EVMLogger Signed-off-by: jsvisa --- cmd/evm/internal/t8ntool/execution.go | 3 ++- cmd/evm/internal/t8ntool/transition.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 5cac5f07f8..40b0fa638f 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" @@ -117,7 +118,7 @@ type rejectedTx struct { // Apply applies a set of transactions to a pre-state func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig, txIt txIterator, miningReward int64, - getTracerFn func(txIndex int, txHash common.Hash) (tracer vm.EVMLogger, err error)) (*state.StateDB, *ExecutionResult, []byte, error) { + getTracerFn func(txIndex int, txHash common.Hash) (tracer tracers.Tracer, err error)) (*state.StateDB, *ExecutionResult, []byte, error) { // Capture errors for BLOCKHASH operation, if we haven't been supplied the // required blockhashes var hashError error diff --git a/cmd/evm/internal/t8ntool/transition.go b/cmd/evm/internal/t8ntool/transition.go index d517592e5c..5bca170a1f 100644 --- a/cmd/evm/internal/t8ntool/transition.go +++ b/cmd/evm/internal/t8ntool/transition.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" @@ -89,7 +90,7 @@ func Transition(ctx *cli.Context) error { err error tracer vm.EVMLogger ) - var getTracer func(txIndex int, txHash common.Hash) (vm.EVMLogger, error) + var getTracer func(txIndex int, txHash common.Hash) (tracers.Tracer, error) baseDir, err := createBasedir(ctx) if err != nil { @@ -122,7 +123,7 @@ func Transition(ctx *cli.Context) error { prevFile.Close() } }() - getTracer = func(txIndex int, txHash common.Hash) (vm.EVMLogger, error) { + getTracer = func(txIndex int, txHash common.Hash) (tracers.Tracer, error) { if prevFile != nil { prevFile.Close() } @@ -134,7 +135,7 @@ func Transition(ctx *cli.Context) error { return logger.NewJSONLogger(logConfig, traceFile), nil } } else { - getTracer = func(txIndex int, txHash common.Hash) (tracer vm.EVMLogger, err error) { + getTracer = func(txIndex int, txHash common.Hash) (tracer tracers.Tracer, err error) { return nil, nil } }