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());
BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of bloc...
bool Init()
Initializes the sync state and registers the instance to the validation interface so that it stays in...
static void BlockFilterIndexSync(benchmark::Bench &bench)
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
ANKERL_NANOBENCH(NODISCARD) std Bench & minEpochIterations(uint64_t numIters) noexcept
Sets the minimum number of iterations each epoch should take.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
An encapsulated public key.
void Sync()
Sync the index with the block index starting from the current best block.
""_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.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
std::unique_ptr< Chain > MakeChain(node::NodeContext &node)
Return implementation of Chain interface.
Serialized script, used inside transaction inputs and outputs.
Main entry point to nanobench's benchmarking facility.
BENCHMARK(BlockFilterIndexSync, benchmark::PriorityLevel::HIGH)
int64_t GetTime()
DEPRECATED, see GetTime.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate...
IndexSummary GetSummary() const
Get a summary of the index and its state.