Skip to content

Commit b44b7c0

Browse files
committed
wallet: Write best block record on unload
1 parent 876a258 commit b44b7c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ bool RemoveWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet
164164

165165
interfaces::Chain& chain = wallet->chain();
166166
std::string name = wallet->GetName();
167+
WITH_LOCK(wallet->cs_wallet, wallet->WriteBestBlock());
167168

168169
// Unregister with the validation interface which also drops shared pointers.
169170
wallet->m_chain_notifications_handler.reset();

0 commit comments

Comments
 (0)