Rename FlushWalletDB -> CompactWalletDB, add function description

This commit is contained in:
Matt Corallo 2017-01-23 09:27:59 -05:00
parent 735d9b5362
commit 0235be1e7a
3 changed files with 4 additions and 3 deletions

View file

@ -3765,7 +3765,7 @@ void CWallet::postInitProcess(CScheduler& scheduler)
// Run a thread to flush wallet periodically
if (!CWallet::fFlushScheduled.exchange(true)) {
scheduler.scheduleEvery(MaybeFlushWalletDB, 500);
scheduler.scheduleEvery(MaybeCompactWalletDB, 500);
}
}

View file

@ -777,7 +777,7 @@ DBErrors CWalletDB::ZapWalletTx(vector<CWalletTx>& vWtx)
return DB_LOAD_OK;
}
void MaybeFlushWalletDB()
void MaybeCompactWalletDB()
{
static std::atomic<bool> fOneThread;
if (fOneThread.exchange(true)) {

View file

@ -193,6 +193,7 @@ private:
void operator=(const CWalletDB&);
};
void MaybeFlushWalletDB();
//! Compacts BDB state so that wallet.dat is self-contained (if there are changes)
void MaybeCompactWalletDB();
#endif // BITCOIN_WALLET_WALLETDB_H