110 bench.minEpochIterations(10).run([&]() {
121 bench.minEpochIterations(10).run([&]() {
132 bench.minEpochIterations(10).run([&]() {
constexpr size_t BLOCK_VTX_COUNT_10PERCENT
static ReorgTxns CreateBlocks(size_t num_not_shared)
Creates blocks for a Reorg, each with BLOCK_VTX_COUNT transactions.
static void AddAndRemoveDisconnectedBlockTransactions90(benchmark::Bench &bench)
Add transactions from DisconnectedBlockTransactions, remove 90% of them, and then pop from the front ...
static void AddAndRemoveDisconnectedBlockTransactionsAll(benchmark::Bench &bench)
Add transactions from DisconnectedBlockTransactions, remove all but one (the disconnected block's coi...
constexpr size_t BLOCK_VTX_COUNT
static void AddAndRemoveDisconnectedBlockTransactions10(benchmark::Bench &bench)
Add transactions from DisconnectedBlockTransactions, remove 10% of them, and then pop from the front ...
static void Reorg(const ReorgTxns &reorg)
decltype(CBlock::vtx) BlockTxns
static BlockTxns CreateRandomTransactions(size_t num_txns)
std::vector< CTransactionRef > vtx
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
DisconnectedBlockTransactions.
std::vector< CTransactionRef > AddTransactionsFromBlock(const std::vector< CTransactionRef > &vtx)
Add transactions from the block, iterating through vtx in reverse order.
Main entry point to nanobench's benchmarking facility.
static const unsigned int MAX_DISCONNECTED_TX_POOL_BYTES
Maximum bytes for transactions to store for processing during reorg.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
static constexpr CAmount CENT
A mutable version of CTransaction.
std::vector< CTxOut > vout
Reorg where 1 block is disconnected and 2 blocks are connected.
BlockTxns connected_txns_1
First connected block.
BlockTxns disconnected_txns
Disconnected block.
BlockTxns connected_txns_2
Second connected block, new chain tip.
size_t num_shared
Transactions shared between disconnected_txns and connected_txns_1.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.