6#include <blockfilter.h>
21 for (
int i = 0; i < 100000; ++i) {
23 element[0] =
static_cast<unsigned char>(i);
24 element[1] =
static_cast<unsigned char>(i >> 8);
constexpr uint8_t BASIC_FILTER_P
constexpr uint32_t BASIC_FILTER_M
Complete block filter struct as defined in BIP 157.
This implements a Golomb-coded set as defined in BIP 158.
std::vector< unsigned char > Element
std::unordered_set< Element, ByteVectorHash > ElementSet
const std::vector< unsigned char > & GetEncoded() const LIFETIMEBOUND
Main entry point to nanobench's benchmarking facility.
static void GCSFilterConstruct(benchmark::Bench &bench)
static GCSFilter::ElementSet GenerateGCSTestElements()
static void GCSFilterDecode(benchmark::Bench &bench)
static void GCSBlockFilterGetHash(benchmark::Bench &bench)
static void GCSFilterDecodeSkipCheck(benchmark::Bench &bench)
static void GCSFilterMatch(benchmark::Bench &bench)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.