mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-16 17:48:59 +02:00
rpc: Make unloadwallet wait for complete wallet unload
This commit is contained in:
@@ -242,7 +242,11 @@ void StopWallets()
|
||||
|
||||
void UnloadWallets()
|
||||
{
|
||||
for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
|
||||
RemoveWallet(pwallet);
|
||||
auto wallets = GetWallets();
|
||||
while (!wallets.empty()) {
|
||||
auto wallet = wallets.back();
|
||||
wallets.pop_back();
|
||||
RemoveWallet(wallet);
|
||||
UnloadWallet(std::move(wallet));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user