OSDN Git Service

feat(version): update version to 1.1.0
[bytom/bytom.git] / test / wallet_test_util.go
index 1d35ee4..1b27ac5 100644 (file)
@@ -7,16 +7,16 @@ import (
        "path"
        "reflect"
 
-       dbm "github.com/tendermint/tmlibs/db"
-
-       "github.com/bytom/account"
-       "github.com/bytom/asset"
-       "github.com/bytom/blockchain/pseudohsm"
-       "github.com/bytom/blockchain/signers"
-       "github.com/bytom/crypto/ed25519/chainkd"
-       "github.com/bytom/protocol"
-       "github.com/bytom/protocol/bc/types"
-       w "github.com/bytom/wallet"
+       "github.com/bytom/bytom/account"
+       "github.com/bytom/bytom/asset"
+       "github.com/bytom/bytom/blockchain/pseudohsm"
+       "github.com/bytom/bytom/blockchain/signers"
+       "github.com/bytom/bytom/crypto/ed25519/chainkd"
+       dbm "github.com/bytom/bytom/database/leveldb"
+       "github.com/bytom/bytom/event"
+       "github.com/bytom/bytom/protocol"
+       "github.com/bytom/bytom/protocol/bc/types"
+       w "github.com/bytom/bytom/wallet"
 )
 
 type walletTestConfig struct {
@@ -153,7 +153,7 @@ func (ctx *walletTestContext) createAsset(accountAlias string, assetAlias string
        if err != nil {
                return nil, err
        }
-       return ctx.Wallet.AssetReg.Define(acc.XPubs, len(acc.XPubs), nil, assetAlias, nil)
+       return ctx.Wallet.AssetReg.Define(acc.XPubs, len(acc.XPubs), nil, 0, assetAlias, nil)
 }
 
 func (ctx *walletTestContext) newBlock(txs []*types.Tx, coinbaseAccount string) (*types.Block, error) {
@@ -259,7 +259,8 @@ func (cfg *walletTestConfig) Run() error {
        walletDB := dbm.NewDB("wallet", "leveldb", path.Join(dirPath, "wallet_db"))
        accountManager := account.NewManager(walletDB, chain)
        assets := asset.NewRegistry(walletDB, chain)
-       wallet, err := w.NewWallet(walletDB, accountManager, assets, hsm, chain)
+       dispatcher := event.NewDispatcher()
+       wallet, err := w.NewWallet(walletDB, accountManager, assets, hsm, chain, dispatcher, false)
        if err != nil {
                return err
        }