6#include <bench/data/block413567.raw.h>
19#include <validation.h>
27struct TestBlockAndIndex {
38 blockHash = block.GetHash();
39 blockindex.phashBlock = &blockHash;
40 blockindex.nBits = 403014710;
48 TestBlockAndIndex
data;
49 const uint256 pow_limit{
data.testing_setup->m_node.chainman->GetParams().GetConsensus().powLimit};
77 TestBlockAndIndex
data;
78 const uint256 pow_limit{
data.testing_setup->m_node.chainman->GetParams().GetConsensus().powLimit};
UniValue blockToJSON(BlockManager &blockman, const CBlock &block, const CBlockIndex &tip, const CBlockIndex &blockindex, TxVerbosity verbosity, const uint256 pow_limit)
Block description to JSON.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Minimal stream for reading from an existing byte array by std::span.
Main entry point to nanobench's benchmarking facility.
static const PrecomputedData data
Precomputed COutPoint and CCoins values.
TxVerbosity
Verbose level for block's transaction.
@ SHOW_DETAILS_AND_PREVOUT
The same as previous option with information about prevouts if available.
@ SHOW_TXID
Only TXID for each block's transaction.
@ SHOW_DETAILS
Include TXID, inputs, outputs, and other common block's transaction information.
void doNotOptimizeAway(Arg &&arg)
Makes sure none of the given arguments are optimized away by the compiler.
constexpr TransactionSerParams TX_WITH_WITNESS
static void BlockToJsonVerbosity2(benchmark::Bench &bench)
static void BlockToJson(benchmark::Bench &bench, TxVerbosity verbosity)
static void BlockToJsonVerbosity1(benchmark::Bench &bench)
static void BlockToJsonVerboseWrite(benchmark::Bench &bench)
static void BlockToJsonVerbosity3(benchmark::Bench &bench)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.