Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
cuckoocache.cpp
Go to the documentation of this file.
1// Copyright (c) 2020-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <cuckoocache.h>
6#include <script/sigcache.h>
8#include <test/fuzz/fuzz.h>
9#include <test/fuzz/util.h>
11
12#include <cstdint>
13#include <string>
14#include <vector>
15
16namespace {
18
19struct RandomHasher {
20 template <uint8_t>
21 uint32_t operator()(const bool& /* unused */) const
22 {
24 return fuzzed_data_provider_ptr->ConsumeIntegral<uint32_t>();
25 }
26};
27} // namespace
28
cache implements a cache with properties similar to a cuckoo-set.
T ConsumeIntegralInRange(T min, T max)
#define FUZZ_TARGET(...)
Definition fuzz.h:35
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
Definition fuzz.h:22
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73
assert(!tx.IsCoinBase())
FuzzedDataProvider & fuzzed_data_provider
Definition fees.cpp:38