8 #include <test/util/mining.h> 9 #include <test/util/setup_common.h> 10 #include <test/util/wallet.h> 19 TestingSetup test_setup{
27 const std::vector<unsigned char> op_true{
OP_TRUE};
29 witness.
stack.push_back(op_true);
37 constexpr
size_t NUM_BLOCKS{200};
39 for (
size_t b{0}; b < NUM_BLOCKS; ++b) {
41 tx.
vin.push_back(MineBlock(test_setup.m_node, SCRIPT_PUB));
42 tx.
vin.back().scriptWitness = witness;
43 tx.
vout.emplace_back(1337, SCRIPT_PUB);
50 for (
const auto& txr : txs) {
58 PrepareBlock(test_setup.m_node, SCRIPT_PUB);
std::shared_ptr< const CTransaction > CTransactionRef
CSHA256 & Write(const unsigned char *data, size_t len)
static const std::string REGTEST
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
bool AcceptToMemoryPool(CTxMemPool &pool, TxValidationState &state, const CTransactionRef &tx, std::list< CTransactionRef > *plTxnReplaced, bool bypass_limits, bool test_accept, CAmount *fee_out)
(try to) add transaction to memory pool plTxnReplaced will be appended to with all transactions repla...
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void AssembleBlock(benchmark::Bench &bench)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate...
std::vector< CTxOut > vout
static CTransactionRef MakeTransactionRef(Tx &&txIn)
Serialized script, used inside transaction inputs and outputs.
A mutable version of CTransaction.
Main entry point to nanobench's benchmarking facility.
A hasher class for SHA-256.