Chainparams: Translations: DRY: options and error strings

Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
This commit is contained in:
Jorge Timón
2015-05-25 09:00:17 +02:00
parent f3525e24e3
commit 55a89751fa
9 changed files with 37 additions and 51 deletions

View File

@@ -19,7 +19,6 @@ public:
static const std::string MAIN;
static const std::string TESTNET;
static const std::string REGTEST;
static const std::string MAX_NETWORK_TYPES;
const std::string& DataDir() const { return strDataDir; }
int RPCPort() const { return nRPCPort; }
@@ -31,6 +30,12 @@ protected:
std::string strDataDir;
};
/**
* Append the help messages for the chainparams options to the
* parameter string.
*/
void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp=true);
/**
* Return the currently selected parameters. This won't change after app
* startup, except for unit tests.
@@ -46,12 +51,6 @@ void SelectBaseParams(const std::string& chain);
*/
std::string ChainNameFromCommandLine();
/**
* Calls NetworkIdFromCommandLine() and then calls SelectParams as appropriate.
* Returns false if an invalid combination is given.
*/
bool SelectBaseParamsFromCommandLine();
/**
* Return true if SelectBaseParamsFromCommandLine() has been called to select
* a network.