diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-04-28 17:37:50 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-06-01 12:53:57 +0200 |
commit | 3260b4c09006ea5c1b00c599a14e6c706ac760f8 (patch) | |
tree | f413a27870dbbf73933c73c58823e377a5c4b22f /src/init.cpp | |
parent | 3d661110dae5fe62585ab753ef996f081a11855d (diff) |
remove GetBoolArg() fDefault parameter defaulting to false
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
section
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/init.cpp b/src/init.cpp index 226e93e9a5..78f838f7cb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -198,7 +198,7 @@ bool AppInit(int argc, char* argv[]) exit(ret); } #if !defined(WIN32) - fDaemon = GetBoolArg("-daemon"); + fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { // Daemonize @@ -495,7 +495,7 @@ bool AppInit2(boost::thread_group& threadGroup) // ********************************************************* Step 2: parameter interactions - fTestNet = GetBoolArg("-testnet"); + fTestNet = GetBoolArg("-testnet", false); Checkpoints::fEnabled = GetBoolArg("-checkpoints", true); if (mapArgs.count("-bind")) { @@ -526,7 +526,7 @@ bool AppInit2(boost::thread_group& threadGroup) SoftSetBoolArg("-discover", false); } - if (GetBoolArg("-salvagewallet")) { + if (GetBoolArg("-salvagewallet", false)) { // Rewrite just private keys: rescan to find transactions SoftSetBoolArg("-rescan", true); } @@ -543,8 +543,8 @@ bool AppInit2(boost::thread_group& threadGroup) // ********************************************************* Step 3: parameter-to-internal-flags - fDebug = GetBoolArg("-debug"); - fBenchmark = GetBoolArg("-benchmark"); + fDebug = GetBoolArg("-debug", false); + fBenchmark = GetBoolArg("-benchmark", false); // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency nScriptCheckThreads = GetArg("-par", 0); @@ -559,20 +559,20 @@ bool AppInit2(boost::thread_group& threadGroup) if (fDebug) fDebugNet = true; else - fDebugNet = GetBoolArg("-debugnet"); + fDebugNet = GetBoolArg("-debugnet", false); if (fDaemon) fServer = true; else - fServer = GetBoolArg("-server"); + fServer = GetBoolArg("-server", false); /* force fServer when running without GUI */ #if !defined(QT_GUI) fServer = true; #endif - fPrintToConsole = GetBoolArg("-printtoconsole"); - fPrintToDebugger = GetBoolArg("-printtodebugger"); - fLogTimestamps = GetBoolArg("-logtimestamps"); + fPrintToConsole = GetBoolArg("-printtoconsole", false); + fPrintToDebugger = GetBoolArg("-printtodebugger", false); + fLogTimestamps = GetBoolArg("-logtimestamps", false); if (mapArgs.count("-timeout")) { @@ -677,7 +677,7 @@ bool AppInit2(boost::thread_group& threadGroup) } } - if (GetBoolArg("-salvagewallet")) + if (GetBoolArg("-salvagewallet", false)) { // Recover readable keypairs: if (!CWalletDB::Recover(bitdb, "wallet.dat", true)) @@ -799,7 +799,7 @@ bool AppInit2(boost::thread_group& threadGroup) // ********************************************************* Step 7: load block chain - fReindex = GetBoolArg("-reindex"); + fReindex = GetBoolArg("-reindex", false); // Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/ filesystem::path blocksDir = GetDataDir() / "blocks"; @@ -922,7 +922,7 @@ bool AppInit2(boost::thread_group& threadGroup) } printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart); - if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree")) + if (GetBoolArg("-printblockindex", false) || GetBoolArg("-printblocktree", false)) { PrintBlockTree(); return false; @@ -1018,7 +1018,7 @@ bool AppInit2(boost::thread_group& threadGroup) RegisterWallet(pwalletMain); CBlockIndex *pindexRescan = pindexBest; - if (GetBoolArg("-rescan")) + if (GetBoolArg("-rescan", false)) pindexRescan = pindexGenesisBlock; else { |