wallet: Write best block record on unload

This commit is contained in:
Ava Chow 2025-03-05 17:50:52 -08:00
parent 876a2585a8
commit b44b7c03fe

View File

@ -164,6 +164,7 @@ bool RemoveWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet
interfaces::Chain& chain = wallet->chain();
std::string name = wallet->GetName();
WITH_LOCK(wallet->cs_wallet, wallet->WriteBestBlock());
// Unregister with the validation interface which also drops shared pointers.
wallet->m_chain_notifications_handler.reset();