Rename FlushWalletDB -> CompactWalletDB, add function description
This commit is contained in:
parent
735d9b5362
commit
0235be1e7a
3 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue