mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 17:56:16 +00:00
wallet: Correctly log stats for encrypted messages.
Previously creating an encrypted wallet would result in the keypool size incorrectly being reported as 0. See: https://github.com/bitcoin/bitcoin/pull/32636#discussion_r2150021064
This commit is contained in:
parent
d8bec61be2
commit
27e021ebc0
@ -413,7 +413,7 @@ std::shared_ptr<CWallet> CreateWallet(WalletContext& context, const std::string&
|
||||
}
|
||||
|
||||
// Make the wallet
|
||||
context.chain->initMessage(_("Loading wallet…"));
|
||||
context.chain->initMessage(_("Creating wallet…"));
|
||||
std::shared_ptr<CWallet> wallet = CWallet::Create(context, name, std::move(database), wallet_creation_flags, error, warnings);
|
||||
if (!wallet) {
|
||||
error = Untranslated("Wallet creation failed.") + Untranslated(" ") + error;
|
||||
@ -447,6 +447,7 @@ std::shared_ptr<CWallet> CreateWallet(WalletContext& context, const std::string&
|
||||
}
|
||||
}
|
||||
|
||||
WITH_LOCK(wallet->cs_wallet, wallet->LogStats());
|
||||
NotifyWalletLoaded(context, wallet);
|
||||
AddWallet(context, wallet);
|
||||
wallet->postInitProcess();
|
||||
@ -3075,8 +3076,6 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
WITH_LOCK(walletInstance->cs_wallet, walletInstance->LogStats());
|
||||
|
||||
return walletInstance;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user