aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-05-09 22:03:50 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-05-10 10:39:58 +0200
commite23088707be2c3bf247f4b777290c8e401db48cb (patch)
tree2bbdefb0d41490d825b9464b37b00bbddc93b1e9 /src/chainparams.cpp
parentfc06881f13495154c888a64a38c7d538baf00435 (diff)
downloadbitcoin-e23088707be2c3bf247f4b777290c8e401db48cb.tar.xz
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
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r--src/chainparams.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f61bf01745..6f4453d1fe 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -117,7 +117,7 @@ std::unique_ptr<const CChainParams> CreateChainParams(const ArgsManager& args, c
return CChainParams::RegTest(opts);
}
}
- throw std::invalid_argument(strprintf("%s: Invalid ChainType value", __func__));
+ assert(false);
}
void SelectParams(const ChainType chain)