|
|
@ -220,24 +220,25 @@ const CChainParams &Params() { |
|
|
|
return *pCurrentParams; |
|
|
|
return *pCurrentParams; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SelectParams(CBaseChainParams::Network network) { |
|
|
|
CChainParams &Params(CBaseChainParams::Network network) { |
|
|
|
SelectBaseParams(network); |
|
|
|
|
|
|
|
switch (network) { |
|
|
|
switch (network) { |
|
|
|
case CBaseChainParams::MAIN: |
|
|
|
case CBaseChainParams::MAIN: |
|
|
|
pCurrentParams = &mainParams; |
|
|
|
return mainParams; |
|
|
|
break; |
|
|
|
|
|
|
|
case CBaseChainParams::TESTNET: |
|
|
|
case CBaseChainParams::TESTNET: |
|
|
|
pCurrentParams = &testNetParams; |
|
|
|
return testNetParams; |
|
|
|
break; |
|
|
|
|
|
|
|
case CBaseChainParams::REGTEST: |
|
|
|
case CBaseChainParams::REGTEST: |
|
|
|
pCurrentParams = ®TestParams; |
|
|
|
return regTestParams; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
assert(false && "Unimplemented network"); |
|
|
|
assert(false && "Unimplemented network"); |
|
|
|
return; |
|
|
|
return mainParams; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SelectParams(CBaseChainParams::Network network) { |
|
|
|
|
|
|
|
SelectBaseParams(network); |
|
|
|
|
|
|
|
pCurrentParams = &Params(network); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool SelectParamsFromCommandLine() { |
|
|
|
bool SelectParamsFromCommandLine() { |
|
|
|
if (!SelectBaseParamsFromCommandLine()) |
|
|
|
if (!SelectBaseParamsFromCommandLine()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|