"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 {
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) {
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
}