"github.com/bytom/blockchain/pseudohsm"
"github.com/bytom/blockchain/txbuilder"
"github.com/bytom/blockchain/txdb"
+ w "github.com/bytom/blockchain/wallet"
cfg "github.com/bytom/config"
"github.com/bytom/crypto/ed25519/chainkd"
"github.com/bytom/protocol"
store := txdb.NewStore(tc)
var accounts *account.Manager
- var wallet *account.Wallet
var assets *asset.Registry
genesisBlock := cfg.GenerateGenesisBlock()
// tx pool init
t.Fatal(err)
}
- walletDB := dbm.NewDB("wallet", config.DBBackend, config.DBDir())
-
accountsDB := dbm.NewDB("account", config.DBBackend, dir)
- wallet = account.NewWallet(walletDB)
- accounts = account.NewManager(accountsDB, chain, wallet)
- //accounts.IndexAccounts(query.NewIndexer(accountsDB, chain))
-
assetsDB := dbm.NewDB("asset", config.DBBackend, dir)
+ walletDB := dbm.NewDB("wallet", config.DBBackend, config.DBDir())
+
+ accounts = account.NewManager(accountsDB, walletDB, w.GetWalletHeight, chain)
assets = asset.NewRegistry(assetsDB, chain)
hsm, err := pseudohsm.New(dirPath)