20 "Use the chain <chain> (default: main). Allowed values: main, "
25 "Enter regression test mode, which uses a special chain in which "
26 "blocks can be solved instantly. This is intended for regression "
27 "testing tools and app development. Equivalent to -chain=regtest.",
30 argsman.
AddArg(
"-testnet",
"Use the test chain. Equivalent to -chain=test.",
45std::unique_ptr<CBaseChainParams>
48 return std::make_unique<CBaseChainParams>(
"", 8332, 8334,
53 return std::make_unique<CBaseChainParams>(
"testnet3",
59 return std::make_unique<CBaseChainParams>(
"regtest", 18443,
64 throw std::runtime_error(
65 strprintf(
"%s: Unknown chain %s.", __func__, chain));
std::unique_ptr< CBaseChainParams > CreateBaseChainParams(const std::string &chain)
Port numbers for incoming Tor connections (8334, 18334, 38334, 18445) have been chosen arbitrarily to...
const CBaseChainParams & BaseParams()
Return the currently selected parameters.
static std::unique_ptr< CBaseChainParams > globalChainBaseParams
void SetupChainParamsBaseOptions(ArgsManager &argsman)
Set the arguments for chainparams.
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
void SelectConfigNetwork(const std::string &network)
Select the network in use.
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat)
Add argument.
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)