[wallet] Add CloseWallets() function to wallet/init.cpp

This commit is contained in:
John Newbery committed 2017-09-07 16:21:26 -07:00
1 parent 77fe07c159
commit 062d63102e
3 files changed
+12 -4

No files matched your search

+1 -4
View File
@@ -265,10 +265,7 @@ void Shutdown()
UnregisterAllValidationInterfaces(); UnregisterAllValidationInterfaces();
GetMainSignals().UnregisterBackgroundSignalScheduler(); GetMainSignals().UnregisterBackgroundSignalScheduler();
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
for (CWalletRef pwallet : vpwallets) { CloseWallets();
delete pwallet;
}
vpwallets.clear();
#endif #endif
globalVerifyHandle.reset(); globalVerifyHandle.reset();
ECC_Stop(); ECC_Stop();
+7
View File
@@ -257,3 +257,10 @@ void StopWallets() {
pwallet->Flush(true); pwallet->Flush(true);
} }
} }
void CloseWallets() {
for (CWalletRef pwallet : vpwallets) {
delete pwallet;
}
vpwallets.clear();
}
+4
View File
@@ -27,4 +27,8 @@ void FlushWallets();
//! Stop all wallets. Wallets will be flushed first. //! Stop all wallets. Wallets will be flushed first.
void StopWallets(); void StopWallets();
//! Close all wallets.
void CloseWallets();
#endif // BITCOIN_WALLET_INIT_H #endif // BITCOIN_WALLET_INIT_H