mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 14:45:12 +01:00
assumeutxo: Add network magic ctor param to SnapshotMetadata
This prevents SnapshotMetadata from using any globals implicitly.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -184,6 +184,6 @@ protected:
|
||||
ChainTxData chainTxData;
|
||||
};
|
||||
|
||||
std::optional<ChainType> GetNetworkForMagic(MessageStartChars& pchMessageStart);
|
||||
std::optional<ChainType> GetNetworkForMagic(const MessageStartChars& pchMessageStart);
|
||||
|
||||
#endif // BITCOIN_KERNEL_CHAINPARAMS_H
|
||||
|
||||
Reference in New Issue
Block a user