File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3765,7 +3765,7 @@ void CWallet::postInitProcess(CScheduler& scheduler)
3765
3765
3766
3766
// Run a thread to flush wallet periodically
3767
3767
if (!CWallet::fFlushScheduled .exchange (true )) {
3768
- scheduler.scheduleEvery (MaybeFlushWalletDB , 500 );
3768
+ scheduler.scheduleEvery (MaybeCompactWalletDB , 500 );
3769
3769
}
3770
3770
}
3771
3771
Original file line number Diff line number Diff line change @@ -777,7 +777,7 @@ DBErrors CWalletDB::ZapWalletTx(vector<CWalletTx>& vWtx)
777
777
return DB_LOAD_OK;
778
778
}
779
779
780
- void MaybeFlushWalletDB ()
780
+ void MaybeCompactWalletDB ()
781
781
{
782
782
static std::atomic<bool > fOneThread ;
783
783
if (fOneThread .exchange (true )) {
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ class CWalletDB : public CDB
193
193
void operator =(const CWalletDB&);
194
194
};
195
195
196
- void MaybeFlushWalletDB ();
196
+ // ! Compacts BDB state so that wallet.dat is self-contained (if there are changes)
197
+ void MaybeCompactWalletDB ();
197
198
198
199
#endif // BITCOIN_WALLET_WALLETDB_H
You can’t perform that action at this time.
0 commit comments