6#include <bench/data/block413567.raw.h>
15#include <validation.h>
24 DataStream stream{benchmark::data::block413567};
33 const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(
ChainType::MAIN)};
40 const auto success{chainman.m_blockman.ReadBlockFromDisk(block, pos)};
47 const auto testing_setup{MakeNoLogFileContext<const TestingSetup>(
ChainType::MAIN)};
50 std::vector<uint8_t> block_data;
54 const auto success{chainman.m_blockman.ReadRawBlockFromDisk(block_data, pos)};
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
node::BlockManager m_blockman
A single BlockManager instance is shared across each constructed chainstate to avoid duplicating bloc...
Double ended buffer combining vector and stream-like interfaces.
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.
bool WriteUndoDataForBlock(const CBlockUndo &blockundo, BlockValidationState &state, CBlockIndex &block) EXCLUSIVE_LOCKS_REQUIRED(FlatFilePos SaveBlockToDisk(const CBlock &block, int nHeight)
Store block on disk and update block file statistics.
static constexpr TransactionSerParams TX_WITH_WITNESS
static void ReadRawBlockFromDiskTest(benchmark::Bench &bench)
static void ReadBlockFromDiskTest(benchmark::Bench &bench)
BENCHMARK(ReadBlockFromDiskTest, benchmark::PriorityLevel::HIGH)
static FlatFilePos WriteBlockToDisk(ChainstateManager &chainman)