10#include <validation.h>
12#include <test/util/setup_common.h>
18struct TestBlockAndIndex {
19 const std::unique_ptr<const TestingSetup> testing_setup{
30 stream.write({&
a, 1});
34 blockHash = block.GetHash();
35 blockindex.phashBlock = &blockHash;
36 blockindex.nBits = 403014710;
43 TestBlockAndIndex data;
46 data.testing_setup->m_node.chainman->m_blockman, data.block,
47 &data.blockindex, &data.blockindex,
true);
55 TestBlockAndIndex data;
57 data.block, &data.blockindex, &data.blockindex,
UniValue blockToJSON(BlockManager &blockman, const CBlock &block, const CBlockIndex *tip, const CBlockIndex *blockindex, bool txDetails)
Block description to JSON.
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
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.
Main entry point to nanobench's benchmarking facility.
void doNotOptimizeAway(Arg &&arg)
Makes sure none of the given arguments are optimized away by the compiler.
const std::vector< uint8_t > block413567
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static void BlockToJsonVerbose(benchmark::Bench &bench)
static void BlockToJsonVerboseWrite(benchmark::Bench &bench)
A BlockHash is a unqiue identifier for a block.
static const int PROTOCOL_VERSION
network protocol versioning