chainparams: add overloads for RegTest and SigNet with no options

For consistency with the overloads introduced in the previous commit,
and because there is already a few places where they are useful.
This commit is contained in:
Antoine Poinsot
2026-05-25 19:00:12 -04:00
parent 4995c00a9c
commit 801e3bfe38
3 changed files with 6 additions and 4 deletions

View File

@@ -703,8 +703,8 @@ std::optional<ChainType> GetNetworkForMagic(const MessageStartChars& message)
const auto mainnet_msg = CChainParams::Main()->MessageStart();
const auto testnet_msg = CChainParams::TestNet()->MessageStart();
const auto testnet4_msg = CChainParams::TestNet4()->MessageStart();
const auto regtest_msg = CChainParams::RegTest({})->MessageStart();
const auto signet_msg = CChainParams::SigNet({})->MessageStart();
const auto regtest_msg = CChainParams::RegTest()->MessageStart();
const auto signet_msg = CChainParams::SigNet()->MessageStart();
if (std::ranges::equal(message, mainnet_msg)) {
return ChainType::MAIN;