BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Public Member Functions | Private Attributes | List of all members
BlockFilter Class Reference

Complete block filter struct as defined in BIP 157. More...

#include <blockfilter.h>

Collaboration diagram for BlockFilter:
[legend]

Public Member Functions

 BlockFilter (BlockFilterType filter_type, const CBlock &block, const CBlockUndo &block_undo)
 
BlockFilterType GetFilterType () const
 
const GCSFilterGetFilter () const
 
const std::vector< unsigned char > & GetEncodedFilter () const
 
uint256 GetHash () const
 
uint256 ComputeHeader (const uint256 &prev_header) const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 

Private Attributes

BlockFilterType m_filter_type
 
uint256 m_block_hash
 
GCSFilter m_filter
 

Detailed Description

Complete block filter struct as defined in BIP 157.

Serialization matches payload of "cfilter" messages.

Definition at line 88 of file blockfilter.h.

Constructor & Destructor Documentation

◆ BlockFilter()

BlockFilter::BlockFilter ( BlockFilterType  filter_type,
const CBlock block,
const CBlockUndo block_undo 
)

Definition at line 227 of file blockfilter.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ ComputeHeader()

uint256 BlockFilter::ComputeHeader ( const uint256 prev_header) const

Definition at line 251 of file blockfilter.cpp.

Here is the call graph for this function:

◆ GetEncodedFilter()

const std::vector<unsigned char>& BlockFilter::GetEncodedFilter ( ) const
inline

Definition at line 104 of file blockfilter.h.

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

◆ GetFilter()

const GCSFilter& BlockFilter::GetFilter ( ) const
inline

Definition at line 102 of file blockfilter.h.

◆ GetFilterType()

BlockFilterType BlockFilter::GetFilterType ( ) const
inline

Definition at line 100 of file blockfilter.h.

◆ GetHash()

uint256 BlockFilter::GetHash ( ) const

Definition at line 242 of file blockfilter.cpp.

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

◆ Serialize()

template<typename Stream >
void BlockFilter::Serialize ( Stream &  s) const
inline

Definition at line 116 of file blockfilter.h.

Here is the call graph for this function:

◆ Unserialize()

template<typename Stream >
void BlockFilter::Unserialize ( Stream &  s)
inline

Definition at line 123 of file blockfilter.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_block_hash

uint256 BlockFilter::m_block_hash
private

Definition at line 92 of file blockfilter.h.

◆ m_filter

GCSFilter BlockFilter::m_filter
private

Definition at line 93 of file blockfilter.h.

◆ m_filter_type

BlockFilterType BlockFilter::m_filter_type
private

Definition at line 91 of file blockfilter.h.


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