@@ -27,7 +27,6 @@ import (
27
27
28
28
"github.com/ethereum/go-ethereum/common"
29
29
"github.com/ethereum/go-ethereum/common/hexutil"
30
- "github.com/ethereum/go-ethereum/common/math"
31
30
"github.com/ethereum/go-ethereum/core"
32
31
"github.com/ethereum/go-ethereum/core/rawdb"
33
32
"github.com/ethereum/go-ethereum/core/types"
@@ -39,14 +38,6 @@ import (
39
38
"github.com/ethereum/go-ethereum/tests"
40
39
)
41
40
42
- type callContext struct {
43
- Number math.HexOrDecimal64 `json:"number"`
44
- Difficulty * math.HexOrDecimal256 `json:"difficulty"`
45
- Time math.HexOrDecimal64 `json:"timestamp"`
46
- GasLimit math.HexOrDecimal64 `json:"gasLimit"`
47
- Miner common.Address `json:"miner"`
48
- }
49
-
50
41
// callLog is the result of LOG opCode
51
42
type callLog struct {
52
43
Address common.Address `json:"address"`
@@ -125,17 +116,8 @@ func testCallTracer(tracerName string, dirPath string, t *testing.T) {
125
116
// Configure a blockchain with the given prestate
126
117
var (
127
118
signer = types .MakeSigner (test .Genesis .Config , new (big.Int ).SetUint64 (uint64 (test .Context .Number )), uint64 (test .Context .Time ))
128
- context = vm.BlockContext {
129
- CanTransfer : core .CanTransfer ,
130
- Transfer : core .Transfer ,
131
- Coinbase : test .Context .Miner ,
132
- BlockNumber : new (big.Int ).SetUint64 (uint64 (test .Context .Number )),
133
- Time : uint64 (test .Context .Time ),
134
- Difficulty : (* big .Int )(test .Context .Difficulty ),
135
- GasLimit : uint64 (test .Context .GasLimit ),
136
- BaseFee : test .Genesis .BaseFee ,
137
- }
138
- state = tests .MakePreState (rawdb .NewMemoryDatabase (), test .Genesis .Alloc , false , rawdb .HashScheme )
119
+ context = test .Context .toBlockContext (test .Genesis )
120
+ state = tests .MakePreState (rawdb .NewMemoryDatabase (), test .Genesis .Alloc , false , rawdb .HashScheme )
139
121
)
140
122
state .Close ()
141
123
0 commit comments