12#include <validation.h>
18struct TestBlockAndIndex {
28 stream.
write({&a, 1});
32 blockHash = block.GetHash();
33 blockindex.phashBlock = &blockHash;
34 blockindex.nBits = 403014710;
42 TestBlockAndIndex data;
53 TestBlockAndIndex data;
56 auto str = univalue.write();
#define BENCHMARK(n, priority_level)
UniValue blockToJSON(BlockManager &blockman, const CBlock &block, const CBlockIndex &tip, const CBlockIndex &blockindex, TxVerbosity verbosity)
Block description to JSON.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Double ended buffer combining vector and stream-like interfaces.
void write(Span< const value_type > src)
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.
@ SHOW_DETAILS_AND_PREVOUT
The same as previous option with information about prevouts if available.
void doNotOptimizeAway(Arg &&arg)
Makes sure none of the given arguments are optimized away by the compiler.
const std::vector< uint8_t > block413567
static constexpr TransactionSerParams TX_WITH_WITNESS
static void BlockToJsonVerbose(benchmark::Bench &bench)
static void BlockToJsonVerboseWrite(benchmark::Bench &bench)
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.