diff --git a/core/types/transaction.go b/core/types/transaction.go index b3f75c5886..d390e52236 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -26,11 +26,9 @@ import ( "sync/atomic" "time" - "github.com/tomochain/tomochain/crypto" - - "github.com/tomochain/tomochain/common/math" - "github.com/tomochain/tomochain/common" + "github.com/tomochain/tomochain/common/math" + "github.com/tomochain/tomochain/crypto" "github.com/tomochain/tomochain/rlp" ) diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index 38d4075175..75ff32bb23 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -20,17 +20,18 @@ import ( "crypto/ecdsa" "crypto/rand" "encoding/json" - "github.com/tomochain/tomochain/core/rawdb" "io/ioutil" "math/big" "path/filepath" "reflect" "strings" "testing" + "github.com/tomochain/tomochain/common" "github.com/tomochain/tomochain/common/hexutil" "github.com/tomochain/tomochain/common/math" "github.com/tomochain/tomochain/core" + "github.com/tomochain/tomochain/core/rawdb" "github.com/tomochain/tomochain/core/types" "github.com/tomochain/tomochain/core/vm" "github.com/tomochain/tomochain/crypto" @@ -178,7 +179,7 @@ func TestPrestateTracerCreate2(t *testing.T) { } evm := vm.NewEVM(context, statedb, nil, params.MainnetChainConfig, vm.Config{Debug: true, Tracer: tracer}) - msg, err := tx.AsMessage(signer, nil, nil) + msg, err := core.TransactionToMessage(signer, nil, nil) if err != nil { t.Fatalf("failed to prepare transaction for tracing: %v", err) } @@ -253,7 +254,7 @@ func TestCallTracer(t *testing.T) { } evm := vm.NewEVM(context, statedb, nil, test.Genesis.Config, vm.Config{Debug: true, Tracer: tracer}) - msg, err := tx.AsMessage(signer, nil, common.Big0) + msg, err := core.TransactionToMessage(signer, nil, common.Big0) if err != nil { t.Fatalf("failed to prepare transaction for tracing: %v", err) } diff --git a/les/odr_test.go b/les/odr_test.go index 3858e34028..2f3342bbaa 100644 --- a/les/odr_test.go +++ b/les/odr_test.go @@ -19,7 +19,6 @@ package les import ( "bytes" "context" - "github.com/tomochain/tomochain/core/rawdb" "math/big" "testing" "time" @@ -27,6 +26,7 @@ import ( "github.com/tomochain/tomochain/common" "github.com/tomochain/tomochain/common/math" "github.com/tomochain/tomochain/core" + "github.com/tomochain/tomochain/core/rawdb" "github.com/tomochain/tomochain/core/state" "github.com/tomochain/tomochain/core/types" "github.com/tomochain/tomochain/core/vm" @@ -110,7 +110,7 @@ func odrAccounts(ctx context.Context, db ethdb.Database, config *params.ChainCon //func TestOdrContractCallLes2(t *testing.T) { testOdr(t, 2, 2, odrContractCall) } type callmsg struct { - types.Message + core.Message } func (callmsg) CheckNonce() bool { return false } @@ -133,6 +133,18 @@ func odrContractCall(ctx context.Context, db ethdb.Database, config *params.Chai if value, ok := feeCapacity[testContractAddr]; ok { balanceTokenFee = value } + //msg := &Message{ + // To: call.To, + // From: call.From, + // Value: call.Value, + // GasLimit: call.Gas, + // GasPrice: call.GasPrice, + // GasFeeCap: call.GasFeeCap, + // GasTipCap: call.GasTipCap, + // Data: call.Data, + // AccessList: call.AccessList, + // SkipAccountChecks: false, + //} msg := callmsg{types.NewMessage(from.Address(), &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false, balanceTokenFee)} context := core.NewEVMContext(msg, header, bc, nil) diff --git a/light/odr_test.go b/light/odr_test.go index 0c5fc78573..e2684051cc 100644 --- a/light/odr_test.go +++ b/light/odr_test.go @@ -148,7 +148,7 @@ func odrAccounts(ctx context.Context, db ethdb.Database, bc *core.BlockChain, lc func TestOdrContractCallLes1(t *testing.T) { testChainOdr(t, 1, odrContractCall) } type callmsg struct { - types.Message + core.Message } func (callmsg) CheckNonce() bool { return false }