mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
refactor: Use ChainType enum exhaustively
This is a follow up of https://github.com/bitcoin/bitcoin/pull/27491, more concretely https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188847896, for not using default cases (as per the style guide), and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188852707 and https://github.com/bitcoin/bitcoin/pull/27491#discussion_r1188851857 for avoiding dead code. Also change chain name to chain type in docstrings
This commit is contained in:
@@ -48,7 +48,7 @@ std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const ChainType chain)
|
||||
case ChainType::REGTEST:
|
||||
return std::make_unique<CBaseChainParams>("regtest", 18443, 18445);
|
||||
}
|
||||
throw std::invalid_argument(strprintf("%s: Invalid ChainType value", __func__));
|
||||
assert(false);
|
||||
}
|
||||
|
||||
void SelectBaseParams(const ChainType chain)
|
||||
|
||||
Reference in New Issue
Block a user