9 #include <test/util/mining.h>
10 #include <test/util/setup_common.h>
11 #include <test/util/wallet.h>
19 TestingSetup test_setup{
33 const CScript scriptSig =
CScript() << std::vector<uint8_t>(100, 0xff)
38 constexpr
size_t NUM_BLOCKS{200};
40 for (
size_t b = 0; b < NUM_BLOCKS; ++b) {
42 tx.
vin.push_back(MineBlock(config, test_setup.m_node, SCRIPT_PUB));
43 tx.
vin.back().scriptSig = scriptSig;
53 for (
const auto &txr : txs) {
55 test_setup.m_node.chainman->ProcessTransaction(txr);
60 bench.
run([&] { PrepareBlock(config, test_setup.m_node, SCRIPT_PUB); });
static constexpr Amount SATOSHI
static void AssembleBlock(benchmark::Bench &bench)
RecursiveMutex cs_main
Global state.
static const std::string REGTEST
A mutable version of CTransaction.
std::vector< CTxOut > vout
Serialized script, used inside transaction inputs and outputs.
A reference to a CScript: the Hash160 of its serialization (see script.h)
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.
const Config & GetConfig()
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule).
static CTransactionRef MakeTransactionRef()
std::shared_ptr< const CTransaction > CTransactionRef
std::vector< uint8_t > ToByteVector(const T &in)
Validation result for a single transaction mempool acceptance.
const ResultType m_result_type
@ VALID
Fully validated, valid.