From a9b91d79f0c812cbf9f0a2e769a5e9b97903636e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 4 Nov 2021 22:59:11 +0100 Subject: [PATCH] eth/tracers: linter nits --- eth/tracers/testing/calltrace_test.go | 7 +++++-- eth/tracers/tracers_test.go | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/eth/tracers/testing/calltrace_test.go b/eth/tracers/testing/calltrace_test.go index d34821d41d4c3..3423e7a58a395 100644 --- a/eth/tracers/testing/calltrace_test.go +++ b/eth/tracers/testing/calltrace_test.go @@ -99,8 +99,11 @@ func testCallTracer(tracerName string, dirPath string, t *testing.T) { var ( signer = types.MakeSigner(test.Genesis.Config, new(big.Int).SetUint64(uint64(test.Context.Number))) origin, _ = signer.Sender(tx) - txContext = vm.TxContext{origin, tx.GasPrice()} - context = vm.BlockContext{ + txContext = vm.TxContext{ + Origin: origin, + GasPrice: tx.GasPrice(), + } + context = vm.BlockContext{ CanTransfer: core.CanTransfer, Transfer: core.Transfer, Coinbase: test.Context.Miner, diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index a894a6d4dae82..ba445fd5ae1c1 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -26,7 +26,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" @@ -100,14 +99,6 @@ type callTrace struct { Calls []callTrace `json:"calls,omitempty"` } -type callContext struct { - Number math.HexOrDecimal64 `json:"number"` - Difficulty *math.HexOrDecimal256 `json:"difficulty"` - Time math.HexOrDecimal64 `json:"timestamp"` - GasLimit math.HexOrDecimal64 `json:"gasLimit"` - Miner common.Address `json:"miner"` -} - // TestZeroValueToNotExitCall tests the calltracer(s) on the following: // Tx to A, A calls B with zero value. B does not already exist. // Expected: that enter/exit is invoked and the inner call is shown in the result