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)
37653765
37663766 // Run a thread to flush wallet periodically
37673767 if (!CWallet::fFlushScheduled .exchange (true )) {
3768- scheduler.scheduleEvery (MaybeFlushWalletDB , 500 );
3768+ scheduler.scheduleEvery (MaybeCompactWalletDB , 500 );
37693769 }
37703770}
37713771
Original file line number Diff line number Diff line change @@ -777,7 +777,7 @@ DBErrors CWalletDB::ZapWalletTx(vector<CWalletTx>& vWtx)
777777 return DB_LOAD_OK;
778778}
779779
780- void MaybeFlushWalletDB ()
780+ void MaybeCompactWalletDB ()
781781{
782782 static std::atomic<bool > fOneThread ;
783783 if (fOneThread .exchange (true )) {
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ class CWalletDB : public CDB
193193 void operator =(const CWalletDB&);
194194};
195195
196- void MaybeFlushWalletDB ();
196+ // ! Compacts BDB state so that wallet.dat is self-contained (if there are changes)
197+ void MaybeCompactWalletDB ();
197198
198199#endif // BITCOIN_WALLET_WALLETDB_H
You can’t perform that action at this time.
0 commit comments