Changeset View
Changeset View
Standalone View
Standalone View
src/merkleblock.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* 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". | ||||
* See BIP37 for details: | * See BIP37 for details: | ||||
* https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki | * https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki | ||||
* | |||||
* NOTE: The class assumes that the given CBlock has *at least* 1 transaction. | |||||
* If the CBlock has 0 txs, it will hit an assertion. | |||||
*/ | */ | ||||
class CMerkleBlock { | class CMerkleBlock { | ||||
public: | public: | ||||
/** Public only for unit testing */ | /** Public only for unit testing */ | ||||
CBlockHeader header; | CBlockHeader header; | ||||
CPartialMerkleTree txn; | CPartialMerkleTree txn; | ||||
/** Public only for unit testing and relay testing (not relayed) */ | /** Public only for unit testing and relay testing (not relayed) */ | ||||
Show All 26 Lines |