diff options
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r-- | src/bitcoind.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 39bb301f44..d8fa473473 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -102,8 +102,10 @@ bool AppInit(int argc, char* argv[]) return false; } // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause) - if (!SelectParamsFromCommandLine()) { - fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n"); + try { + SelectParams(ChainNameFromCommandLine()); + } catch(std::exception &e) { + fprintf(stderr, "Error: %s\n", e.what()); return false; } |