Allocate and init transaction store for newly created accounts.
This commit is contained in:
parent
6805d7a7a1
commit
acb4819ee1
2 changed files with 5 additions and 2 deletions
|
@ -285,7 +285,8 @@ func (am *AccountManager) CreateEncryptedWallet(passphrase []byte) error {
|
|||
// manager. Registering will fail if the new account can not be
|
||||
// written immediately to disk.
|
||||
a := &Account{
|
||||
Wallet: wlt,
|
||||
Wallet: wlt,
|
||||
TxStore: tx.NewStore(),
|
||||
}
|
||||
if err := am.RegisterNewAccount(a); err != nil {
|
||||
return err
|
||||
|
|
4
cmd.go
4
cmd.go
|
@ -261,7 +261,9 @@ func (e *WalletOpenError) Error() string {
|
|||
func OpenSavedAccount(name string, cfg *config) (*Account, error) {
|
||||
netdir := networkDir(cfg.Net())
|
||||
if err := checkCreateDir(netdir); err != nil {
|
||||
return nil, err
|
||||
return nil, &WalletOpenError{
|
||||
Err: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
wlt := new(wallet.Wallet)
|
||||
|
|
Loading…
Add table
Reference in a new issue