We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 207cfbf + 9d2b73d commit 5c56ee1Copy full SHA for 5c56ee1
src/bitcoin-cli.cpp
@@ -7,6 +7,7 @@
7
#include "init.h"
8
#include "rpcclient.h"
9
#include "ui_interface.h" /* for _(...) */
10
+#include "chainparams.h"
11
12
#include <boost/filesystem/operations.hpp>
13
@@ -26,6 +27,11 @@ static bool AppInitRPC(int argc, char* argv[])
26
27
return false;
28
}
29
ReadConfigFile(mapArgs, mapMultiArgs);
30
+ // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause)
31
+ if (!SelectParamsFromCommandLine()) {
32
+ fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
33
+ return false;
34
+ }
35
36
if (argc<2 || mapArgs.count("-?") || mapArgs.count("--help"))
37
{
0 commit comments