mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-30 08:51:29 +00:00
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
|
// manager. Registering will fail if the new account can not be
|
||||||
// written immediately to disk.
|
// written immediately to disk.
|
||||||
a := &Account{
|
a := &Account{
|
||||||
Wallet: wlt,
|
Wallet: wlt,
|
||||||
|
TxStore: tx.NewStore(),
|
||||||
}
|
}
|
||||||
if err := am.RegisterNewAccount(a); err != nil {
|
if err := am.RegisterNewAccount(a); err != nil {
|
||||||
return err
|
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) {
|
func OpenSavedAccount(name string, cfg *config) (*Account, error) {
|
||||||
netdir := networkDir(cfg.Net())
|
netdir := networkDir(cfg.Net())
|
||||||
if err := checkCreateDir(netdir); err != nil {
|
if err := checkCreateDir(netdir); err != nil {
|
||||||
return nil, err
|
return nil, &WalletOpenError{
|
||||||
|
Err: err.Error(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wlt := new(wallet.Wallet)
|
wlt := new(wallet.Wallet)
|
||||||
|
|
Loading…
Add table
Reference in a new issue