wallet: Use shared pointer to retain wallet instance

This commit is contained in:
João Barbosa
2018-05-22 16:18:07 +01:00
parent 6916024768
commit 80b4910f7d
15 changed files with 239 additions and 139 deletions

View File

@@ -756,7 +756,7 @@ void MaybeCompactWalletDB()
return;
}
for (CWallet* pwallet : GetWallets()) {
for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
WalletDatabase& dbh = pwallet->GetDBHandle();
unsigned int nUpdateCounter = dbh.nUpdateCounter;