diff options
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/init.cpp | 6 | ||||
| -rw-r--r-- | src/wallet/init.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index f39201e79..f58f3bc54 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -245,3 +245,9 @@ bool OpenWallets() return true; } + +void FlushWallets(bool shutdown) { + for (CWalletRef pwallet : vpwallets) { + pwallet->Flush(shutdown); + } +} diff --git a/src/wallet/init.h b/src/wallet/init.h index a66b35943..5445c72d1 100644 --- a/src/wallet/init.h +++ b/src/wallet/init.h @@ -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 |