mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user