Merge 29243 via fix_wallet_cleanup_handler_pr29243-23

This commit is contained in:
Luke Dashjr 2024-03-25 17:26:53 +00:00
commit 0985c0a842

View File

@ -3115,6 +3115,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
if (time_first_key) walletInstance->MaybeUpdateBirthTime(*time_first_key);
if (chain && !AttachChain(walletInstance, *chain, rescan_required, error, warnings)) {
walletInstance->m_chain_notifications_handler.reset(); // Reset this pointer so that the wallet will actually be unloaded
return nullptr;
}