diff --git a/src/init.cpp b/src/init.cpp index 68aacf073..13a82739c 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 e5bc653c3..cf6122813 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 64071caa3..46bc0ac0a 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