mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
wallet: Postpone NotifyWalletLoaded() for encrypted wallets
Too early NotifyWalletLoaded() call in CWallet::Create() results the notification goes before DescriptorScriptPubKeyMans were created and added to an encrypted wallet. Co-authored-by: Andrew Chow <achow101-github@achow101.com>
This commit is contained in:
@@ -54,6 +54,7 @@ static const std::shared_ptr<CWallet> TestLoadWallet(WalletContext& context)
|
||||
std::vector<bilingual_str> warnings;
|
||||
auto database = MakeWalletDatabase("", options, status, error);
|
||||
auto wallet = CWallet::Create(context, "", std::move(database), options.create_flags, error, warnings);
|
||||
NotifyWalletLoaded(context, wallet);
|
||||
if (context.chain) {
|
||||
wallet->postInitProcess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user