8 #include <test/util/mining.h> 9 #include <test/util/script.h> 10 #include <test/util/setup_common.h> 11 #include <test/util/wallet.h> 20 const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
23 witness.
stack.push_back(WITNESS_STACK_ELEM_OP_TRUE);
26 constexpr
size_t NUM_BLOCKS{200};
28 for (
size_t b{0}; b < NUM_BLOCKS; ++b) {
30 tx.
vin.push_back(MineBlock(test_setup->m_node, P2WSH_OP_TRUE));
31 tx.
vin.back().scriptWitness = witness;
32 tx.
vout.emplace_back(1337, P2WSH_OP_TRUE);
39 for (
const auto& txr : txs) {
46 PrepareBlock(test_setup->m_node, P2WSH_OP_TRUE);
std::shared_ptr< const CTransaction > CTransactionRef
MempoolAcceptResult AcceptToMemoryPool(CChainState &active_chainstate, CTxMemPool &pool, const CTransactionRef &tx, bool bypass_limits, bool test_accept)
(Try to) add a transaction to the memory pool.
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule) ...
std::vector< std::vector< unsigned char > > stack
const ResultType m_result_type
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void AssembleBlock(benchmark::Bench &bench)
std::vector< CTxOut > vout
Validation result for a single transaction mempool acceptance.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate...
A mutable version of CTransaction.
Main entry point to nanobench's benchmarking facility.