mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 02:05:10 +01:00
refactor: remove ::vpwallets and related global variables
Move global wallet variables to WalletContext struct
This commit is contained in:
@@ -1004,14 +1004,14 @@ DBErrors WalletBatch::ZapSelectTx(std::vector<uint256>& vTxHashIn, std::vector<u
|
||||
return DBErrors::LOAD_OK;
|
||||
}
|
||||
|
||||
void MaybeCompactWalletDB()
|
||||
void MaybeCompactWalletDB(WalletContext& context)
|
||||
{
|
||||
static std::atomic<bool> fOneThread(false);
|
||||
if (fOneThread.exchange(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
|
||||
for (const std::shared_ptr<CWallet>& pwallet : GetWallets(context)) {
|
||||
WalletDatabase& dbh = pwallet->GetDatabase();
|
||||
|
||||
unsigned int nUpdateCounter = dbh.nUpdateCounter;
|
||||
|
||||
Reference in New Issue
Block a user