Skip to content

Commit 420a82f

Browse files
committed
Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool)
1 parent caa3d42 commit 420a82f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ std::string HelpMessage(HelpMessageMode mode)
404404
if (showDebug)
405405
{
406406
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", 1));
407-
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush database activity from memory pool to disk log every <n> megabytes (default: %u)", 100));
407+
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush wallet database activity from memory to disk log every <n> megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE));
408408
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", 0));
409409
strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", 0));
410410
strUsage += HelpMessageOpt("-dropmessagestest=<n>", "Randomly drop 1 of every <n> network messages");

src/wallet/db.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void CDB::Flush()
293293
if (fReadOnly)
294294
nMinutes = 1;
295295

296-
bitdb.dbenv->txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100) * 1024 : 0, nMinutes, 0);
296+
bitdb.dbenv->txn_checkpoint(nMinutes ? GetArg("-dblogsize", DEFAULT_WALLET_DBLOGSIZE) * 1024 : 0, nMinutes, 0);
297297
}
298298

299299
void CDB::Close()

src/wallet/db.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#include <db_cxx.h>
2222

23+
static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100;
24+
2325
extern unsigned int nWalletDBUpdated;
2426

2527
class CDBEnv

0 commit comments

Comments
 (0)