File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -189,9 +189,7 @@ void Shutdown()
189
189
StopRPC ();
190
190
StopHTTPServer ();
191
191
#ifdef ENABLE_WALLET
192
- for (CWalletRef pwallet : vpwallets) {
193
- pwallet->Flush (false );
194
- }
192
+ FlushWallets (false );
195
193
#endif
196
194
MapPort (false );
197
195
UnregisterValidationInterface (peerLogic.get ());
@@ -246,9 +244,7 @@ void Shutdown()
246
244
pblocktree = nullptr ;
247
245
}
248
246
#ifdef ENABLE_WALLET
249
- for (CWalletRef pwallet : vpwallets) {
250
- pwallet->Flush (true );
251
- }
247
+ FlushWallets (true );
252
248
#endif
253
249
254
250
#if ENABLE_ZMQ
Original file line number Diff line number Diff line change @@ -245,3 +245,9 @@ bool OpenWallets()
245
245
246
246
return true ;
247
247
}
248
+
249
+ void FlushWallets (bool shutdown) {
250
+ for (CWalletRef pwallet : vpwallets) {
251
+ pwallet->Flush (shutdown);
252
+ }
253
+ }
Original file line number Diff line number Diff line change @@ -22,4 +22,7 @@ bool VerifyWallets();
22
22
// ! Load wallet databases.
23
23
bool OpenWallets ();
24
24
25
+ // ! Flush all wallets in preparation for shutdown.
26
+ // ! Call with shutdown = true to actually shutdown the wallet.
27
+ void FlushWallets (bool shutdown);
25
28
#endif // BITCOIN_WALLET_INIT_H
You can’t perform that action at this time.
0 commit comments