@@ -32,9 +32,7 @@ std::string HelpMessageCli()
3232 strUsage += HelpMessageOpt (" -?" , _ (" This help message" ));
3333 strUsage += HelpMessageOpt (" -conf=<file>" , strprintf (_ (" Specify configuration file (default: %s)" ), PIVX_CONF_FILENAME));
3434 strUsage += HelpMessageOpt (" -datadir=<dir>" , _ (" Specify data directory" ));
35- strUsage += HelpMessageOpt (" -testnet" , _ (" Use the test network" ));
36- strUsage += HelpMessageOpt (" -regtest" , _ (" Enter regression test mode, which uses a special chain in which blocks can be "
37- " solved instantly. This is intended for regression testing tools and app development." ));
35+ AppendParamsHelpMessages (strUsage);
3836 strUsage += HelpMessageOpt (" -rpcconnect=<ip>" , strprintf (_ (" Send commands to node running on <ip> (default: %s)" ), DEFAULT_RPCCONNECT));
3937 strUsage += HelpMessageOpt (" -rpcport=<port>" , strprintf (_ (" Connect to JSON-RPC on <port> (default: %u or testnet: %u)" ), 51473 , 51475 ));
4038 strUsage += HelpMessageOpt (" -rpcwait" , _ (" Wait for RPC server to start" ));
@@ -93,8 +91,10 @@ static bool AppInitRPC(int argc, char* argv[])
9391 return false ;
9492 }
9593 // Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
96- if (!SelectBaseParamsFromCommandLine ()) {
97- fprintf (stderr, " Error: Invalid combination of -regtest and -testnet.\n " );
94+ try {
95+ SelectBaseParams (ChainNameFromCommandLine ());
96+ } catch (const std::exception& e) {
97+ fprintf (stderr, " Error: %s\n " , e.what ());
9898 return false ;
9999 }
100100 if (gArgs .GetBoolArg (" -rpcssl" , false ))
0 commit comments