17 const auto test_setup = MakeNoLogFileContext<TestChain100Setup>();
21 CPubKey pubkey{
ParseHex(
"02ed26169896db86ced4cbb7b3ecef9859b5952825adbeab998fb5b307e54949c9")};
23 std::vector<CMutableTransaction> noTxns;
24 for (
int i = 0; i < CHAIN_SIZE - 100; i++) {
25 test_setup->CreateAndProcessBlock(noTxns,
script);
34 assert(!filter_index.BlockUntilSyncedToCurrentChain());
BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of bloc...
std::vector< Byte > ParseHex(std::string_view hex_str)
Like TryParseHex, but returns an empty vector on invalid input.
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.
#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.