6#include <bench/data/block413567.raw.h>
7#include <chainparams.h>
30 DataStream stream(benchmark::data::block413567);
32 stream.
write({&a, 1});
37 bool rewound = stream.
Rewind(benchmark::data::block413567.size());
44 DataStream stream(benchmark::data::block413567);
46 stream.
write({&a, 1});
54 bool rewound = stream.
Rewind(benchmark::data::block413567.size());
58 bool checked =
CheckBlock(block, validationState, chainParams->GetConsensus());
std::unique_ptr< const CChainParams > CreateChainParams(const ArgsManager &args, const ChainType chain)
Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.
BENCHMARK(DeserializeBlockTest, benchmark::PriorityLevel::HIGH)
static void DeserializeAndCheckBlockTest(benchmark::Bench &bench)
static void DeserializeBlockTest(benchmark::Bench &bench)
Double ended buffer combining vector and stream-like interfaces.
void write(Span< const value_type > src)
bool Rewind(std::optional< size_type > n=std::nullopt)
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.
Bench & unit(char const *unit)
Sets the operation unit.
static constexpr TransactionSerParams TX_WITH_WITNESS
bool CheckBlock(const CBlock &block, BlockValidationState &state, const Consensus::Params &consensusParams, bool fCheckPOW, bool fCheckMerkleRoot)
Functions for validating blocks and updating the block tree.