diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-11-29 07:55:48 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-11-29 07:56:05 +0100 |
| commit | 5c56ee1ace7d36cc40ad0b70d1c5aa8afe71f613 (patch) | |
| tree | 556bf5ab65ef41a945c1da7b9eddf3ef7f2036bd /src/bitcoin-cli.cpp | |
| parent | Merge pull request #3295 (diff) | |
| parent | bitcoin-cli: Add missing SelectParamsFromCommandLine (diff) | |
| download | discoin-5c56ee1ace7d36cc40ad0b70d1c5aa8afe71f613.tar.xz discoin-5c56ee1ace7d36cc40ad0b70d1c5aa8afe71f613.zip | |
Merge pull request #3328
9d2b73d bitcoin-cli: Add missing SelectParamsFromCommandLine (Wladimir J. van der Laan)
Diffstat (limited to 'src/bitcoin-cli.cpp')
| -rw-r--r-- | src/bitcoin-cli.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index e4a648e98..4e6594746 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -7,6 +7,7 @@ #include "init.h" #include "rpcclient.h" #include "ui_interface.h" /* for _(...) */ +#include "chainparams.h" #include <boost/filesystem/operations.hpp> @@ -26,6 +27,11 @@ static bool AppInitRPC(int argc, char* argv[]) 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 (argc<2 || mapArgs.count("-?") || mapArgs.count("--help")) { |