15#include <validation.h>
28 const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
37 constexpr size_t NUM_BLOCKS{200};
39 for (
size_t b{0}; b < NUM_BLOCKS; ++b) {
41 tx.
vin.emplace_back(
MineBlock(test_setup->m_node, options));
42 tx.
vin.back().scriptWitness = witness;
50 for (
const auto& txr : txs) {
63 auto testing_setup{MakeNoLogFileContext<TestChain100Setup>()};
64 testing_setup->PopulateMempool(det_rand, 1000,
true);
68 .coinbase_output_script = P2WSH_OP_TRUE,
69 .test_block_validity = false
static void AssembleBlock(benchmark::Bench &bench)
static void BlockAssemblerAddPackageTxns(benchmark::Bench &bench)
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.
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
is used externally by mining IPC clients, so it should only declare simple data definitions.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::shared_ptr< const CTransaction > CTransactionRef
A mutable version of CTransaction.
std::vector< CTxOut > vout
std::vector< std::vector< unsigned char > > stack
Validation result for a transaction evaluated by MemPoolAccept (single or package).
const ResultType m_result_type
Result type.
Block template creation options.
CScript coinbase_output_script
Script to put in the coinbase transaction.
std::shared_ptr< CBlock > PrepareBlock(const NodeContext &node, const node::BlockCreateOptions &assembler_options)
Prepare a block to be mined.
COutPoint MineBlock(const NodeContext &node, const node::BlockCreateOptions &assembler_options)
Returns the generated coin.
static const std::vector< uint8_t > WITNESS_STACK_ELEM_OP_TRUE
static const CScript P2WSH_OP_TRUE