assumeutxo: Add network magic ctor param to SnapshotMetadata

This prevents SnapshotMetadata from using any globals implicitly.
This commit is contained in:
Fabian Jahr
2024-05-24 11:41:42 +02:00
parent 1f1f998455
commit 6b6084850b
7 changed files with 22 additions and 12 deletions

View File

@@ -554,7 +554,7 @@ std::vector<int> CChainParams::GetAvailableSnapshotHeights() const
return heights;
}
std::optional<ChainType> GetNetworkForMagic(MessageStartChars& message)
std::optional<ChainType> GetNetworkForMagic(const MessageStartChars& message)
{
const auto mainnet_msg = CChainParams::Main()->MessageStart();
const auto testnet_msg = CChainParams::TestNet()->MessageStart();