assumeutxo: Add network magic ctor param to SnapshotMetadata

This prevents SnapshotMetadata from using any globals implicitly.
This commit is contained in:
Fabian Jahr committed 2024-05-24 18:44:02 +02:00
1 parent 1f1f998455
commit 6b6084850b
7 files changed
+22 -12

No files matched your search

+1 -1
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();