5#include <blockfilter.h>
20 const std::optional<BlockFilter> block_filter = ConsumeDeserializable<BlockFilter>(fuzzed_data_provider);
25 (void)block_filter->ComputeHeader(
ConsumeUInt256(fuzzed_data_provider));
26 (void)block_filter->GetBlockHash();
27 (void)block_filter->GetEncodedFilter();
28 (void)block_filter->GetHash();
31 const BlockFilterType block_filter_type = block_filter->GetFilterType();
35 const GCSFilter gcs_filter = block_filter->GetFilter();
36 (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 Params & GetParams() 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 std::vector< unsigned char > & GetEncoded() 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
void SeedRandomStateForTest(SeedRand seedtype)
Seed the global RNG state for testing and log the seed value.
@ ZEROS
Seed with a compile time constant of zeros.