@ -189,9 +189,7 @@ void Shutdown()
StopRPC();
StopHTTPServer();
#ifdef ENABLE_WALLET
for (CWalletRef pwallet : vpwallets) {
FlushWallets(false);
pwallet->Flush(false);
}
#endif
MapPort(false);
UnregisterValidationInterface(peerLogic.get());
@ -246,9 +244,7 @@ void Shutdown()
pblocktree = nullptr;
FlushWallets(true);
pwallet->Flush(true);
#if ENABLE_ZMQ
@ -245,3 +245,9 @@ bool OpenWallets()
return true;
void FlushWallets(bool shutdown) {
pwallet->Flush(shutdown);
@ -22,4 +22,7 @@ bool VerifyWallets();
//! Load wallet databases.
bool OpenWallets();
//! Flush all wallets in preparation for shutdown.
//! Call with shutdown = true to actually shutdown the wallet.
void FlushWallets(bool shutdown);
#endif // BITCOIN_WALLET_INIT_H