refactor: Use Txid in CMerkleBlock

This commit is contained in:
MarcoFalke
2023-11-28 17:03:19 +01:00
parent 26b7bcf10e
commit fa02c08c93
5 changed files with 15 additions and 14 deletions

View File

@@ -11,6 +11,7 @@
#include <serialize.h>
#include <uint256.h>
#include <set>
#include <vector>
// Helper functions for serialization.
@@ -144,7 +145,7 @@ public:
CMerkleBlock(const CBlock& block, CBloomFilter& filter) : CMerkleBlock(block, &filter, nullptr) { }
// Create from a CBlock, matching the txids in the set
CMerkleBlock(const CBlock& block, const std::set<uint256>& txids) : CMerkleBlock(block, nullptr, &txids) { }
CMerkleBlock(const CBlock& block, const std::set<Txid>& txids) : CMerkleBlock{block, nullptr, &txids} {}
CMerkleBlock() {}
@@ -152,7 +153,7 @@ public:
private:
// Combined constructor to consolidate code
CMerkleBlock(const CBlock& block, CBloomFilter* filter, const std::set<uint256>* txids);
CMerkleBlock(const CBlock& block, CBloomFilter* filter, const std::set<Txid>* txids);
};
#endif // BITCOIN_MERKLEBLOCK_H