aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-02-27 11:30:05 -0500
committerGavin Andresen <gavinandresen@gmail.com>2012-02-27 11:30:05 -0500
commit90d78142c077a553a988f4f39c75b071a026b87d (patch)
treeb8c8fa45b720a7c3b553fdc23626ebf849896e5f /src/init.cpp
parentfbbd42a535813b2d7e30dba44c5c36b70833fe55 (diff)
parent42c8b56f62af171ee1e14963df301358970b1525 (diff)
Merge branch 'nooptionsinwallet+fixproxysetting' of https://github.com/sipa/bitcoin
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 3a8fcdf524..a9d9eb71c2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -150,27 +150,15 @@ bool AppInit2(int argc, char* argv[])
//
// Parameters
//
- // If Qt is used, parameters are parsed in qt/bitcoin.cpp's main()
+ // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
#if !defined(QT_GUI)
ParseParameters(argc, argv);
-#endif
-
- if (mapArgs.count("-datadir"))
+ if (!ReadConfigFile(mapArgs, mapMultiArgs))
{
- if (filesystem::is_directory(filesystem::system_complete(mapArgs["-datadir"])))
- {
- filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]);
- strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
- }
- else
- {
- fprintf(stderr, "Error: Specified directory does not exist\n");
- Shutdown(NULL);
- }
+ fprintf(stderr, "Error: Specified directory does not exist\n");
+ Shutdown(NULL);
}
-
-
- ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir
+#endif
if (mapArgs.count("-?") || mapArgs.count("--help"))
{
@@ -473,8 +461,6 @@ bool AppInit2(int argc, char* argv[])
return false;
}
- fGenerateBitcoins = GetBoolArg("-gen");
-
if (mapArgs.count("-proxy"))
{
fUseProxy = true;
@@ -520,13 +506,6 @@ bool AppInit2(int argc, char* argv[])
COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
}
- // Command-line args override in-wallet settings:
-#if USE_UPNP
- fUseUPnP = GetBoolArg("-upnp", true);
-#else
- fUseUPnP = GetBoolArg("-upnp", false);
-#endif
-
if (!fNoListen)
{
std::string strError;