23 strUsage +=
HelpMessageOpt(
"-regtest",
"Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
24 "This is intended for regression testing tools and app development.");
28 static std::unique_ptr<CBaseChainParams> globalChainBaseParams;
32 assert(globalChainBaseParams);
33 return *globalChainBaseParams;
39 return std::make_unique<CBaseChainParams>(
"", 51473);
41 return std::make_unique<CBaseChainParams>(
"testnet5", 51475);
43 return std::make_unique<CBaseChainParams>(
"regtest", 51477);
45 throw std::runtime_error(
strprintf(
"%s: Unknown chain %s.", __func__, chain));
const CBaseChainParams & BaseParams()
Return the currently selected parameters.
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
std::unique_ptr< CBaseChainParams > CreateBaseChainParams(const std::string &chain)
Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain.
void AppendParamsHelpMessages(std::string &strUsage, bool debugHelp)
Append the help messages for the chainparams options to the parameter string.
void SelectConfigNetwork(const std::string &network)
Select the network in use.
CBaseChainParams defines the base parameters (shared between pivx-cli and pivxd) of a given instance ...
static const std::string REGTEST
static const std::string TESTNET
static const std::string MAIN
Chain name strings.
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.