![]() |
Bitcoin Core
27.99.0
P2P Digital Currency
|
Complete block filter struct as defined in BIP 157. More...
#include <blockfilter.h>
Public Member Functions | |
BlockFilter ()=default | |
BlockFilter (BlockFilterType filter_type, const uint256 &block_hash, std::vector< unsigned char > filter, bool skip_decode_check) | |
Reconstruct a BlockFilter from parts. More... | |
BlockFilter (BlockFilterType filter_type, const CBlock &block, const CBlockUndo &block_undo) | |
Construct a new BlockFilter of the specified type from a block. More... | |
BlockFilterType | GetFilterType () const |
const uint256 & | GetBlockHash () const LIFETIMEBOUND |
const GCSFilter & | GetFilter () const LIFETIMEBOUND |
const std::vector< unsigned char > & | GetEncodedFilter () const LIFETIMEBOUND |
uint256 | GetHash () const |
Compute the filter hash. More... | |
uint256 | ComputeHeader (const uint256 &prev_header) const |
Compute the filter header given the previous one. More... | |
template<typename Stream > | |
void | Serialize (Stream &s) const |
template<typename Stream > | |
void | Unserialize (Stream &s) |
Private Member Functions | |
bool | BuildParams (GCSFilter::Params ¶ms) const |
Private Attributes | |
BlockFilterType | m_filter_type = BlockFilterType::INVALID |
uint256 | m_block_hash |
GCSFilter | m_filter |
Complete block filter struct as defined in BIP 157.
Serialization matches payload of "cfilter" messages.
Definition at line 114 of file blockfilter.h.
|
default |
BlockFilter::BlockFilter | ( | BlockFilterType | filter_type, |
const uint256 & | block_hash, | ||
std::vector< unsigned char > | filter, | ||
bool | skip_decode_check | ||
) |
Reconstruct a BlockFilter from parts.
Definition at line 207 of file blockfilter.cpp.
BlockFilter::BlockFilter | ( | BlockFilterType | filter_type, |
const CBlock & | block, | ||
const CBlockUndo & | block_undo | ||
) |
Construct a new BlockFilter of the specified type from a block.
Definition at line 218 of file blockfilter.cpp.
|
private |
Definition at line 228 of file blockfilter.cpp.
Compute the filter header given the previous one.
Definition at line 249 of file blockfilter.cpp.
|
inline |
|
inline |
Definition at line 138 of file blockfilter.h.
|
inline |
|
inline |
uint256 BlockFilter::GetHash | ( | ) | const |
Compute the filter hash.
Definition at line 244 of file blockfilter.cpp.
|
inline |
|
inline |
|
private |
Definition at line 118 of file blockfilter.h.
|
private |
Definition at line 119 of file blockfilter.h.
|
private |
Definition at line 117 of file blockfilter.h.