Dash Core  0.12.2.1
P2P Digital Currency
CMerkleBlock Class Reference

#include <merkleblock.h>

Public Member Functions

 CMerkleBlock (const CBlock &block, CBloomFilter &filter)
 
 CMerkleBlock (const CBlock &block, const std::set< uint256 > &txids)
 
 CMerkleBlock ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

Public Attributes

CBlockHeader header
 
CPartialMerkleTree txn
 
std::vector< std::pair< unsigned int, uint256 > > vMatchedTxn
 
 ADD_SERIALIZE_METHODS
 

Detailed Description

Used to relay blocks as header + vector<merkle branch> to filtered nodes.

Definition at line 124 of file merkleblock.h.

Constructor & Destructor Documentation

◆ CMerkleBlock() [1/3]

CMerkleBlock::CMerkleBlock ( const CBlock block,
CBloomFilter filter 
)

Create from a CBlock, filtering transactions according to filter Note that this will call IsRelevantAndUpdate on the filter for each transaction, thus the filter will likely be modified.

Definition at line 14 of file merkleblock.cpp.

◆ CMerkleBlock() [2/3]

CMerkleBlock::CMerkleBlock ( const CBlock block,
const std::set< uint256 > &  txids 
)

Definition at line 40 of file merkleblock.cpp.

◆ CMerkleBlock() [3/3]

CMerkleBlock::CMerkleBlock ( )
inline

Definition at line 145 of file merkleblock.h.

Member Function Documentation

◆ SerializationOp()

template<typename Stream , typename Operation >
void CMerkleBlock::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 150 of file merkleblock.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CMerkleBlock::ADD_SERIALIZE_METHODS

Definition at line 147 of file merkleblock.h.

◆ header

CBlockHeader CMerkleBlock::header

Public only for unit testing

Definition at line 128 of file merkleblock.h.

Referenced by SerializationOp().

◆ txn

CPartialMerkleTree CMerkleBlock::txn

Definition at line 129 of file merkleblock.h.

Referenced by SerializationOp().

◆ vMatchedTxn

std::vector<std::pair<unsigned int, uint256> > CMerkleBlock::vMatchedTxn

Public only for unit testing and relay testing (not relayed)

Definition at line 133 of file merkleblock.h.

Referenced by ProcessGetData().


The documentation for this class was generated from the following files: