From 420a82f1ae2f56938ea935fbdbb60e47685684c7 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 27 Jun 2015 23:15:11 +0000 Subject: Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) --- src/init.cpp | 2 +- src/wallet/db.cpp | 2 +- src/wallet/db.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/init.cpp b/src/init.cpp index 68aacf073c..13a82739cc 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -404,7 +404,7 @@ std::string HelpMessage(HelpMessageMode mode) if (showDebug) { strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", 1)); - strUsage += HelpMessageOpt("-dblogsize=", strprintf("Flush database activity from memory pool to disk log every megabytes (default: %u)", 100)); + strUsage += HelpMessageOpt("-dblogsize=", strprintf("Flush wallet database activity from memory to disk log every megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE)); strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", 0)); strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", 0)); strUsage += HelpMessageOpt("-dropmessagestest=", "Randomly drop 1 of every network messages"); diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index e5bc653c33..cf6122813c 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -293,7 +293,7 @@ void CDB::Flush() if (fReadOnly) nMinutes = 1; - bitdb.dbenv->txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100) * 1024 : 0, nMinutes, 0); + bitdb.dbenv->txn_checkpoint(nMinutes ? GetArg("-dblogsize", DEFAULT_WALLET_DBLOGSIZE) * 1024 : 0, nMinutes, 0); } void CDB::Close() diff --git a/src/wallet/db.h b/src/wallet/db.h index 64071caa3a..46bc0ac0a9 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -20,6 +20,8 @@ #include +static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100; + extern unsigned int nWalletDBUpdated; class CDBEnv -- cgit v1.2.3