aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-05-25 09:00:17 +0200
committerJorge Timón <jtimon@jtimon.cc>2015-10-20 14:28:43 +0200
commit55a89751faaada5598771d10401030e9e86eecbd (patch)
tree87607d31265c50db8955f805d280faeb8e82ab03 /src/bitcoind.cpp
parentf3525e24e3a156eaa004ca28a59fe2d449dc1f9e (diff)
downloadbitcoin-55a89751faaada5598771d10401030e9e86eecbd.tar.xz
Chainparams: Translations: DRY: options and error strings
Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp6
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;
}