PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CMerkleBlock Class Reference

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

#include <merkleblock.h>

Collaboration diagram for CMerkleBlock:
[legend]

Public Member Functions

 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. More...
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

Public Attributes

CBlockHeader header
 Public only for unit testing. More...
 
CPartialMerkleTree txn
 
std::vector< std::pair< unsigned int, uint256 > > vMatchedTxn
 Public only for unit testing and relay testing (not relayed) More...
 
 ADD_SERIALIZE_METHODS
 

Detailed Description

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

NOTE: The class assumes that the given CBlock has at least 1 transaction. If the CBlock has 0 txs, it will hit an assertion.

Definition at line 127 of file merkleblock.h.

Constructor & Destructor Documentation

◆ CMerkleBlock()

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 16 of file merkleblock.cpp.

Here is the call graph for this function:

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 148 of file merkleblock.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CMerkleBlock::ADD_SERIALIZE_METHODS

Definition at line 145 of file merkleblock.h.

◆ header

CBlockHeader CMerkleBlock::header

Public only for unit testing.

Definition at line 131 of file merkleblock.h.

◆ txn

CPartialMerkleTree CMerkleBlock::txn

Definition at line 132 of file merkleblock.h.

◆ vMatchedTxn

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

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

Definition at line 136 of file merkleblock.h.


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