File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -265,10 +265,7 @@ void Shutdown()
265265 UnregisterAllValidationInterfaces ();
266266 GetMainSignals ().UnregisterBackgroundSignalScheduler ();
267267#ifdef ENABLE_WALLET
268- for (CWalletRef pwallet : vpwallets) {
269- delete pwallet;
270- }
271- vpwallets.clear ();
268+ CloseWallets ();
272269#endif
273270 globalVerifyHandle.reset ();
274271 ECC_Stop ();
Original file line number Diff line number Diff line change @@ -257,3 +257,10 @@ void StopWallets() {
257257 pwallet->Flush (true );
258258 }
259259}
260+
261+ void CloseWallets () {
262+ for (CWalletRef pwallet : vpwallets) {
263+ delete pwallet;
264+ }
265+ vpwallets.clear ();
266+ }
Original file line number Diff line number Diff line change @@ -27,4 +27,8 @@ void FlushWallets();
2727
2828// ! Stop all wallets. Wallets will be flushed first.
2929void StopWallets ();
30+
31+ // ! Close all wallets.
32+ void CloseWallets ();
33+
3034#endif // BITCOIN_WALLET_INIT_H
You can’t perform that action at this time.
0 commit comments