aboutsummaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorgavinandresen <gavinandresen@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-12-03 19:38:09 +0000
committergavinandresen <gavinandresen@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-12-03 19:38:09 +0000
commitbdde31d787c4fe2da8e9fb168abbd22af2c27442 (patch)
tree46005f6e32c45217699a84a4ed3b8a665359a0bb /init.cpp
parentbfd471f53e14c4218ae7a1544beb7f1de3e695b2 (diff)
All boolean options/flags now work the same way.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@194 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/init.cpp b/init.cpp
index 78e842b5a9..61ca4d2bd5 100644
--- a/init.cpp
+++ b/init.cpp
@@ -206,14 +206,11 @@ bool AppInit2(int argc, char* argv[])
return false;
}
- if (mapArgs.count("-debug"))
- fDebug = true;
+ fDebug = GetBoolArg("-debug");
- if (mapArgs.count("-printtodebugger"))
- fPrintToDebugger = true;
+ fPrintToDebugger = GetBoolArg("-printtodebugger");
- if (mapArgs.count("-testnet"))
- fTestNet = true;
+ fTestNet = GetBoolArg("-testnet");
if (fCommandLine)
{
@@ -232,7 +229,7 @@ bool AppInit2(int argc, char* argv[])
#endif
printf("Default data directory %s\n", GetDefaultDataDir().c_str());
- if (mapArgs.count("-loadblockindextest"))
+ if (GetBoolArg("-loadblockindextest"))
{
CTxDB txdb("r");
txdb.LoadBlockIndex();
@@ -348,7 +345,7 @@ bool AppInit2(int argc, char* argv[])
//
// Parameters
//
- if (mapArgs.count("-printblockindex") || mapArgs.count("-printblocktree"))
+ if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree"))
{
PrintBlockTree();
return false;
@@ -377,13 +374,7 @@ bool AppInit2(int argc, char* argv[])
return false;
}
- if (mapArgs.count("-gen"))
- {
- if (mapArgs["-gen"].empty())
- fGenerateBitcoins = true;
- else
- fGenerateBitcoins = (atoi(mapArgs["-gen"].c_str()) != 0);
- }
+ fGenerateBitcoins = GetBoolArg("-gen");
if (mapArgs.count("-proxy"))
{
@@ -434,7 +425,7 @@ bool AppInit2(int argc, char* argv[])
if (!CreateThread(StartNode, NULL))
wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
- if (mapArgs.count("-server") || fDaemon)
+ if (GetBoolArg("-server") || fDaemon)
CreateThread(ThreadRPCServer, NULL);
#if defined(__WXMSW__) && defined(GUI)