diff options
| author | Gavin Andresen <[email protected]> | 2013-08-22 01:54:28 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-08-22 01:54:28 -0700 |
| commit | e62f8d72f349aec0865268c089ae99fedd314af1 (patch) | |
| tree | 7735f34781f1ced27553b202bceaa74048018636 /src/bitcoind.cpp | |
| parent | Merge pull request #2922 from Diapolo/translations (diff) | |
| parent | Payment Protocol: X509-validated payment requests (diff) | |
| download | discoin-e62f8d72f349aec0865268c089ae99fedd314af1.tar.xz discoin-e62f8d72f349aec0865268c089ae99fedd314af1.zip | |
Merge pull request #2539 from gavinandresen/paymentrequest
Payment Protocol Work
Diffstat (limited to 'src/bitcoind.cpp')
| -rw-r--r-- | src/bitcoind.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index be18f9ae8..02e4e7d6e 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -39,10 +39,15 @@ bool AppInit(int argc, char* argv[]) ParseParameters(argc, argv); if (!boost::filesystem::is_directory(GetDataDir(false))) { - fprintf(stderr, "Error: Specified directory does not exist\n"); - Shutdown(); + fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str()); + return false; } ReadConfigFile(mapArgs, mapMultiArgs); + // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause) + if (!SelectParamsFromCommandLine()) { + fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n"); + return false; + } if (mapArgs.count("-?") || mapArgs.count("--help")) { @@ -67,10 +72,6 @@ bool AppInit(int argc, char* argv[]) if (fCommandLine) { - if (!SelectParamsFromCommandLine()) { - fprintf(stderr, "Error: invalid combination of -regtest and -testnet.\n"); - return false; - } int ret = CommandLineRPC(argc, argv); exit(ret); } |