22 strUsage +=
HelpMessageOpt(
"-regtest",
"Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
23 "This is intended for regression testing tools and app development.");
72 assert(pCurrentBaseParams);
73 return *pCurrentBaseParams;
85 throw std::runtime_error(
strprintf(
"%s: Unknown chain %s.", __func__, chain));
98 if (fTestNet && fRegTest)
99 throw std::runtime_error(
"Invalid combination of -regtest and -testnet.");
109 return pCurrentBaseParams != NULL;
const CBaseChainParams & BaseParams()
Return the currently selected parameters.
bool AreBaseParamsConfigured()
Return true if SelectBaseParamsFromCommandLine() has been called to select a network.
std::string ChainNameFromCommandLine()
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
void AppendParamsHelpMessages(std::string &strUsage, bool debugHelp)
Append the help messages for the chainparams options to the parameter string.
CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind) of a given ins...
static const std::string REGTEST
static const std::string TESTNET
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
std::string HelpMessageGroup(const std::string &message)
Format a string to be used as group of options in help messages.
std::string HelpMessageOpt(const std::string &option, const std::string &message)
Format a string to be used as option description in help messages.
std::string _(const char *psz)
Translation function: Call Translate signal on UI interface, which returns a boost::optional result.