aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp33
1 files changed, 6 insertions, 27 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 3a8fcdf52..8fe0f90b1 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;
@@ -507,7 +493,7 @@ bool AppInit2(int argc, char* argv[])
if (fTestNet)
SoftSetArg("-paytoscripthashtime", "1329264000"); // Feb 15
else
- SoftSetArg("-paytoscripthashtime", "1330578000"); // Mar 1
+ SoftSetArg("-paytoscripthashtime", "1333238400"); // April 1 2012
// Put "/P2SH/" in the coinbase so everybody can tell when
// a majority of miners support it
@@ -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;