Changeset View
Changeset View
Standalone View
Standalone View
src/chainparamsbase.cpp
Show All 14 Lines | |||||
const std::string CBaseChainParams::TESTNET = "test"; | const std::string CBaseChainParams::TESTNET = "test"; | ||||
const std::string CBaseChainParams::REGTEST = "regtest"; | const std::string CBaseChainParams::REGTEST = "regtest"; | ||||
void SetupChainParamsBaseOptions() { | void SetupChainParamsBaseOptions() { | ||||
gArgs.AddArg("-regtest", | gArgs.AddArg("-regtest", | ||||
"Enter regression test mode, which uses a special chain in " | "Enter regression test mode, which uses a special chain in " | ||||
"which blocks can be solved instantly. This is intended for " | "which blocks can be solved instantly. This is intended for " | ||||
"regression testing tools and app development.", | "regression testing tools and app development.", | ||||
true, OptionsCategory::CHAINPARAMS); | ArgsManager::ALLOW_ANY, true, OptionsCategory::CHAINPARAMS); | ||||
gArgs.AddArg("-testnet", "Use the test chain", false, | gArgs.AddArg("-testnet", "Use the test chain", ArgsManager::ALLOW_ANY, | ||||
OptionsCategory::CHAINPARAMS); | false, OptionsCategory::CHAINPARAMS); | ||||
} | } | ||||
static std::unique_ptr<CBaseChainParams> globalChainBaseParams; | static std::unique_ptr<CBaseChainParams> globalChainBaseParams; | ||||
const CBaseChainParams &BaseParams() { | const CBaseChainParams &BaseParams() { | ||||
assert(globalChainBaseParams); | assert(globalChainBaseParams); | ||||
return *globalChainBaseParams; | return *globalChainBaseParams; | ||||
} | } | ||||
Show All 23 Lines |