7#include <blockfilter.h>
22#include <validation.h>
33 const auto test_setup = MakeNoLogFileContext<TestChain100Setup>();
37 CPubKey pubkey{
"02ed26169896db86ced4cbb7b3ecef9859b5952825adbeab998fb5b307e54949c9"_hex_u8};
39 std::vector<CMutableTransaction> noTxns;
40 for (
int i = 0; i < CHAIN_SIZE - 100; i++) {
41 test_setup->CreateAndProcessBlock(noTxns,
script);
50 assert(!filter_index.BlockUntilSyncedToCurrentChain());
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
bool Init()
Initializes the sync state and registers the instance to the validation interface so that it stays in...
IndexSummary GetSummary() const
Get a summary of the index and its state.
void Sync()
Sync the index with the block index starting from the current best block.
BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of bloc...
An encapsulated public key.
Serialized script, used inside transaction inputs and outputs.
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
ANKERL_NANOBENCH(NODISCARD) std Bench & minEpochIterations(uint64_t numIters) noexcept
Sets the minimum number of iterations each epoch should take.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
static void BlockFilterIndexSync(benchmark::Bench &bench)
BENCHMARK(BlockFilterIndexSync, benchmark::PriorityLevel::HIGH)
std::unique_ptr< Chain > MakeChain(node::NodeContext &node)
Return implementation of Chain interface.
""_hex is a compile-time user-defined literal returning a std::array<std::byte>, equivalent to ParseH...
#define WITH_LOCK(cs, code)
Run code while locking a mutex.
int64_t GetTime()
DEPRECATED Use either ClockType::now() or Now<TimePointType>() if a cast is needed.
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.