|
|
@ -83,23 +83,23 @@ void SelectBaseParams(CBaseChainParams::Network network) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CBaseChainParams::Network CBaseChainParams::NetworkIdFromCommandLine() |
|
|
|
CBaseChainParams::Network NetworkIdFromCommandLine() |
|
|
|
{ |
|
|
|
{ |
|
|
|
bool fRegTest = GetBoolArg("-regtest", false); |
|
|
|
bool fRegTest = GetBoolArg("-regtest", false); |
|
|
|
bool fTestNet = GetBoolArg("-testnet", false); |
|
|
|
bool fTestNet = GetBoolArg("-testnet", false); |
|
|
|
|
|
|
|
|
|
|
|
if (fTestNet && fRegTest) |
|
|
|
if (fTestNet && fRegTest) |
|
|
|
return MAX_NETWORK_TYPES; |
|
|
|
return CBaseChainParams::MAX_NETWORK_TYPES; |
|
|
|
if (fRegTest) |
|
|
|
if (fRegTest) |
|
|
|
return REGTEST; |
|
|
|
return CBaseChainParams::REGTEST; |
|
|
|
if (fTestNet) |
|
|
|
if (fTestNet) |
|
|
|
return TESTNET; |
|
|
|
return CBaseChainParams::TESTNET; |
|
|
|
return MAIN; |
|
|
|
return CBaseChainParams::MAIN; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool SelectBaseParamsFromCommandLine() |
|
|
|
bool SelectBaseParamsFromCommandLine() |
|
|
|
{ |
|
|
|
{ |
|
|
|
CBaseChainParams::Network network = CBaseChainParams::NetworkIdFromCommandLine(); |
|
|
|
CBaseChainParams::Network network = NetworkIdFromCommandLine(); |
|
|
|
if (network == CBaseChainParams::MAX_NETWORK_TYPES) |
|
|
|
if (network == CBaseChainParams::MAX_NETWORK_TYPES) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|