OSDN Git Service

Merge pull request #466 from Bytom/update-mov
[bytom/vapor.git] / blockchain / txbuilder / txbuilder_test.go
index 8cd1432..bd52030 100644 (file)
@@ -10,16 +10,16 @@ import (
 
        "github.com/davecgh/go-spew/spew"
 
-       "github.com/vapor/common"
-       "github.com/vapor/consensus"
-       "github.com/vapor/crypto"
-       "github.com/vapor/crypto/ed25519/chainkd"
-       chainjson "github.com/vapor/encoding/json"
-       "github.com/vapor/errors"
-       "github.com/vapor/protocol/bc"
-       "github.com/vapor/protocol/bc/types"
-       "github.com/vapor/protocol/vm/vmutil"
-       "github.com/vapor/testutil"
+       "github.com/bytom/vapor/common"
+       "github.com/bytom/vapor/consensus"
+       "github.com/bytom/vapor/crypto"
+       "github.com/bytom/vapor/crypto/ed25519/chainkd"
+       chainjson "github.com/bytom/vapor/encoding/json"
+       "github.com/bytom/vapor/errors"
+       "github.com/bytom/vapor/protocol/bc"
+       "github.com/bytom/vapor/protocol/bc/types"
+       "github.com/bytom/vapor/protocol/vm/vmutil"
+       "github.com/bytom/vapor/testutil"
 )
 
 type testAction bc.AssetAmount
@@ -59,7 +59,7 @@ func TestBuildIntra(t *testing.T) {
        expiryTime := time.Now().Add(time.Minute)
        got, err := Build(ctx, nil, actions, expiryTime, 0)
        if err != nil {
-               testutil.FatalErr(t, err)
+               t.Fatal(err)
        }
 
        want := &Template{
@@ -88,7 +88,7 @@ func TestBuildIntra(t *testing.T) {
 }
 
 func newCrossOutAction(assetAmt bc.AssetAmount, redeemContract []byte) *crossOutAction {
-       address, err := common.NewAddressWitnessPubKeyHash(redeemContract, &consensus.MainNetParams)
+       address, err := common.NewAddressWitnessPubKeyHash(redeemContract, consensus.BytomMainNetParams(&consensus.ActiveNetParams))
        if err != nil {
                panic(err)
        }
@@ -115,7 +115,7 @@ func TestBuildCrossOut(t *testing.T) {
        expiryTime := time.Now().Add(time.Minute)
        got, err := Build(ctx, nil, actions, expiryTime, 0)
        if err != nil {
-               testutil.FatalErr(t, err)
+               t.Fatal(err)
        }
 
        want := &Template{