OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wallet store interface (#217)
[bytom/vapor.git]
/
node
/
node.go
diff --git
a/node/node.go
b/node/node.go
index
d82c155
..
764edf4
100644
(file)
--- a/
node/node.go
+++ b/
node/node.go
@@
-110,9
+110,11
@@
func NewNode(config *cfg.Config) *Node {
if !config.Wallet.Disable {
walletDB := dbm.NewDB("wallet", config.DBBackend, config.DBDir())
if !config.Wallet.Disable {
walletDB := dbm.NewDB("wallet", config.DBBackend, config.DBDir())
- accounts = account.NewManager(walletDB, chain)
+ walletStore := database.NewWalletStore(walletDB)
+ accountStore := database.NewAccountStore(walletDB)
+ accounts = account.NewManager(accountStore, chain)
assets = asset.NewRegistry(walletDB, chain)
assets = asset.NewRegistry(walletDB, chain)
- wallet, err = w.NewWallet(wallet
DB
, accounts, assets, hsm, chain, dispatcher, config.Wallet.TxIndex)
+ wallet, err = w.NewWallet(wallet
Store
, accounts, assets, hsm, chain, dispatcher, config.Wallet.TxIndex)
if err != nil {
log.WithFields(log.Fields{"module": logModule, "error": err}).Error("init NewWallet")
}
if err != nil {
log.WithFields(log.Fields{"module": logModule, "error": err}).Error("init NewWallet")
}