From 0c12f0116ca802f55f5ab43e6c4842ac403b9889 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:28:42 +0200 Subject: 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 --- src/wallet/test/wallet_tests.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/test') diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 5518f4fdae..683f0eb327 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -54,6 +54,7 @@ static const std::shared_ptr TestLoadWallet(WalletContext& context) std::vector 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(); } -- cgit v1.2.3