Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | List of all members
CPartialMerkleTreeTester Class Reference
Inheritance diagram for CPartialMerkleTreeTester:
[legend]
Collaboration diagram for CPartialMerkleTreeTester:
[legend]

Public Member Functions

void Damage ()
 
- Public Member Functions inherited from CPartialMerkleTree
 SERIALIZE_METHODS (CPartialMerkleTree, obj)
 
 CPartialMerkleTree (const std::vector< uint256 > &vTxid, const std::vector< bool > &vMatch)
 Construct a partial merkle tree from a list of transaction ids, and a mask that selects a subset of them. More...
 
 CPartialMerkleTree ()
 
uint256 ExtractMatches (std::vector< uint256 > &vMatch, std::vector< unsigned int > &vnIndex)
 extract the matching txid's represented by this partial merkle tree and their respective indices within the partial tree. More...
 
unsigned int GetNumTransactions () const
 Get number of transactions the merkle proof is indicating for cross-reference with local blockchain knowledge. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CPartialMerkleTree
unsigned int CalcTreeWidth (int height) const
 helper function to efficiently calculate the number of nodes at given height in the merkle tree More...
 
uint256 CalcHash (int height, unsigned int pos, const std::vector< uint256 > &vTxid)
 calculate the hash of a node in the merkle tree (at leaf level: the txid's themselves) More...
 
void TraverseAndBuild (int height, unsigned int pos, const std::vector< uint256 > &vTxid, const std::vector< bool > &vMatch)
 recursive function that traverses tree nodes, storing the data as bits and hashes More...
 
uint256 TraverseAndExtract (int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector< uint256 > &vMatch, std::vector< unsigned int > &vnIndex)
 recursive function that traverses tree nodes, consuming the bits and hashes produced by TraverseAndBuild. More...
 
- Protected Attributes inherited from CPartialMerkleTree
unsigned int nTransactions
 the total number of transactions in the block More...
 
std::vector< bool > vBits
 node-is-parent-of-matched-txid bits More...
 
std::vector< uint256vHash
 txids and internal hashes More...
 
bool fBad
 flag set when encountering invalid data More...
 

Detailed Description

Definition at line 18 of file pmt_tests.cpp.

Member Function Documentation

◆ Damage()

void CPartialMerkleTreeTester::Damage ( )
inline

Definition at line 22 of file pmt_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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