MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ChainNameFromCommandLine

Function ChainNameFromCommandLine

src/chainparamsbase.cpp:123–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123std::string ChainNameFromCommandLine()
124{
125 bool fRegTest = GetBoolArg("-regtest", false);
126 bool fTestNet = GetBoolArg("-testnet", false);
127 bool fBIP100Net = GetBoolArg("-testnet-bip100", false);
128
129 if (fTestNet && fRegTest)
130 throw std::runtime_error("Invalid combination of -regtest and -testnet.");
131 if (fRegTest)
132 return CBaseChainParams::REGTEST;
133 if (fTestNet)
134 return CBaseChainParams::TESTNET;
135 if (fBIP100Net)
136 return CBaseChainParams::BIP100NET;
137 return CBaseChainParams::MAIN;
138}
139
140bool AreBaseParamsConfigured()
141{

Callers 4

AppInitRawTxFunction · 0.85
AppInitRPCFunction · 0.85
AppInitFunction · 0.85
mainFunction · 0.85

Calls 1

GetBoolArgFunction · 0.85

Tested by

no test coverage detected