5 #include <blockfilter.h>
18 const std::optional<BlockFilter> block_filter = ConsumeDeserializable<BlockFilter>(fuzzed_data_provider);
23 (void)block_filter->ComputeHeader(
ConsumeUInt256(fuzzed_data_provider));
24 (void)block_filter->GetBlockHash();
25 (void)block_filter->GetEncodedFilter();
26 (void)block_filter->GetHash();
29 const BlockFilterType block_filter_type = block_filter->GetFilterType();
33 const GCSFilter gcs_filter = block_filter->GetFilter();
34 (void)gcs_filter.
GetN();
const std::string & BlockFilterTypeName(BlockFilterType filter_type)
Get the human-readable name for a filter type.
This implements a Golomb-coded set as defined in BIP 158.
std::unordered_set< Element, ByteVectorHash > ElementSet
const std::vector< unsigned char > & GetEncoded() const LIFETIMEBOUND
bool Match(const Element &element) const
Checks if the element may be in the set.
bool MatchAny(const ElementSet &elements) const
Checks if any of the given elements may be in the set.
const Params & GetParams() const LIFETIMEBOUND
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
uint256 ConsumeUInt256(FuzzedDataProvider &fuzzed_data_provider) noexcept
std::vector< B > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept