Changeset View
Changeset View
Standalone View
Standalone View
src/merkleblock.h
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Extract the matching txid's represented by this partial merkle tree and | * Extract the matching txid's represented by this partial merkle tree and | ||||
* their respective indices within the partial tree. Returns the merkle | * their respective indices within the partial tree. Returns the merkle | ||||
* root, or 0 in case of failure. | * root, or 0 in case of failure. | ||||
*/ | */ | ||||
uint256 ExtractMatches(std::vector<uint256> &vMatch, | uint256 ExtractMatches(std::vector<uint256> &vMatch, | ||||
std::vector<size_t> &vnIndex); | std::vector<size_t> &vnIndex); | ||||
/** | |||||
* Get number of transactions the merkle proof is indicating for | |||||
* cross-reference with local blockchain knowledge. | |||||
*/ | |||||
uint32_t GetNumTransactions() const { return nTransactions; }; | |||||
}; | }; | ||||
/** | /** | ||||
* Used to create a Merkle proof (usually from a subset of transactions), | * Used to create a Merkle proof (usually from a subset of transactions), | ||||
* which consists of a block header and partial Merkle Tree. | * which consists of a block header and partial Merkle Tree. | ||||
* SPV clients typically use this Merkle proof to limit bandwidth and | * SPV clients typically use this Merkle proof to limit bandwidth and | ||||
* computation requirements to process incoming transactions. | * computation requirements to process incoming transactions. | ||||
* From the peer-node's perspective, the SPV client is a "filtered node". | * From the peer-node's perspective, the SPV client is a "filtered node". | ||||
Show All 39 Lines |