@@ -20,6 +20,7 @@ import (
20
20
"crypto/rand"
21
21
"encoding/json"
22
22
23
+ // "fmt"
23
24
"io/ioutil"
24
25
"math/big"
25
26
"path/filepath"
@@ -238,7 +239,25 @@ func testCallTracer(tracer string, dirPath string, t *testing.T) {
238
239
if err := rlp .DecodeBytes (common .FromHex (test .Input ), tx ); err != nil {
239
240
t .Fatalf ("failed to parse testcase input: %v" , err )
240
241
}
241
-
242
+ // fmt.Printf("tx: %+v\n", tx)
243
+ // fmt.Printf("tx.Protected():\n %t", tx.Protected())
244
+ // fmt.Printf("tx.Type(): %d\n", tx.Type())
245
+ // fmt.Printf("tx.ChainId(): %s\n", tx.ChainId())
246
+ // fmt.Printf("tx.FeeCurrency(): %s\n", tx.FeeCurrency())
247
+ // fmt.Printf("tx.GatewayFeeRecipient(): %s\n", tx.GatewayFeeRecipient())
248
+ // fmt.Printf("tx.GatewayFee(): %s\n", tx.GatewayFee())
249
+ // fmt.Printf("tx.EthCompatible(): %t\n", tx.EthCompatible())
250
+ // fmt.Printf("tx.Fee(): %s\n", tx.Fee())
251
+ // // fmt.Printf("tx.Data(): %s\n", tx.Data())
252
+ // fmt.Printf("tx.AccessList(): %s\n", tx.AccessList())
253
+ // fmt.Printf("tx.Gas(): %d\n", tx.Gas())
254
+ // fmt.Printf("tx.GasPrice(): %s\n", tx.GasPrice())
255
+ // fmt.Printf("tx.GasTipCap(): %s\n", tx.GasTipCap())
256
+ // fmt.Printf("tx.GasFeeCap(): %s\n", tx.GasFeeCap())
257
+ // fmt.Printf("tx.Value(): %s\n", tx.Value())
258
+ // fmt.Printf("tx.Nonce(): %d\n", tx.Nonce())
259
+ // fmt.Printf("tx.To(): %s\n", tx.To())
260
+ // fmt.Printf("tx.Cost(): %s\n", tx.Cost())
242
261
signer := types .MakeSigner (test .Genesis .Config , new (big.Int ).SetUint64 (uint64 (test .Context .Number )))
243
262
origin , _ := signer .Sender (tx )
244
263
txContext := vm.TxContext {
@@ -252,7 +271,18 @@ func testCallTracer(tracer string, dirPath string, t *testing.T) {
252
271
BlockNumber : new (big.Int ).SetUint64 (uint64 (test .Context .Number )),
253
272
254
273
Time : new (big.Int ).SetUint64 (uint64 (test .Context .Time )),
274
+ // GasLimit: uint64(test.Context.GasLimit),
275
+ // GetRegisteredAddress: contracts.GetRegisteredAddress,
255
276
}
277
+ // context := vm.BlockContext{
278
+ // CanTransfer: vmcontext.CanTransfer,
279
+ // Transfer: vmcontext.TobinTransfer,
280
+ // Coinbase: test.Context.Miner,
281
+ // BlockNumber: new(big.Int).SetUint64(uint64(test.Context.Number)),
282
+ // Time: new(big.Int).SetUint64(uint64(test.Context.Time)),
283
+ // GasLimit: uint64(test.Context.GasLimit),
284
+ // GetRegisteredAddress: contracts.GetRegisteredAddress,
285
+ // }
256
286
_ , statedb := tests .MakePreState (rawdb .NewMemoryDatabase (), test .Genesis .Alloc , false )
257
287
258
288
// Create the tracer, the EVM environment and run it
@@ -266,6 +296,7 @@ func testCallTracer(tracer string, dirPath string, t *testing.T) {
266
296
if err != nil {
267
297
t .Fatalf ("failed to prepare transaction for tracing: %v" , err )
268
298
}
299
+ // st := core.NewStateTransition(evm, msg, new(core.GasPool).AddGas(tx.Gas()), nil)
269
300
st := core .NewStateTransition (evm , msg , new (core.GasPool ).AddGas (tx .Gas ()), celoMock .Runner , nil )
270
301
if _ , err = st .TransitionDb (); err != nil {
271
302
t .Fatalf ("failed to execute transaction: %v" , err )
0 commit comments