Browse Source

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

0.16
John Newbery 7 years ago
parent
commit
062d63102e
  1. 5
      src/init.cpp
  2. 7
      src/wallet/init.cpp
  3. 4
      src/wallet/init.h

5
src/init.cpp

@ -265,10 +265,7 @@ void Shutdown() @@ -265,10 +265,7 @@ void Shutdown()
UnregisterAllValidationInterfaces();
GetMainSignals().UnregisterBackgroundSignalScheduler();
#ifdef ENABLE_WALLET
for (CWalletRef pwallet : vpwallets) {
delete pwallet;
}
vpwallets.clear();
CloseWallets();
#endif
globalVerifyHandle.reset();
ECC_Stop();

7
src/wallet/init.cpp

@ -257,3 +257,10 @@ void StopWallets() { @@ -257,3 +257,10 @@ void StopWallets() {
pwallet->Flush(true);
}
}
void CloseWallets() {
for (CWalletRef pwallet : vpwallets) {
delete pwallet;
}
vpwallets.clear();
}

4
src/wallet/init.h

@ -27,4 +27,8 @@ void FlushWallets(); @@ -27,4 +27,8 @@ void FlushWallets();
//! Stop all wallets. Wallets will be flushed first.
void StopWallets();
//! Close all wallets.
void CloseWallets();
#endif // BITCOIN_WALLET_INIT_H

Loading…
Cancel
Save