30 for (
unsigned int i = 0; i <
num_inputs; ++i) {
50 tx.
vin.emplace_back(inputs.at(i % inputs.size()));
63 std::vector<CTransactionRef>
tiny_txs;
113 static constexpr unsigned int NUM_PEERS{39};
130 std::vector<size_t> indexes;
132 std::iota(indexes.begin(), indexes.end(), 0);
static CTransactionRef MakeTransactionSpendingUpTo(const std::vector< CTxIn > &inputs, unsigned int start_input, unsigned int num_inputs, int64_t weight_limit)
static void OrphanageEraseForPeer(benchmark::Bench &bench)
static void OrphanageEraseForBlock(benchmark::Bench &bench)
static CTransactionRef MakeTransactionBulkedTo(unsigned int num_inputs, int64_t target_weight, FastRandomContext &det_rand)
static void OrphanageEraseAll(benchmark::Bench &bench, bool block_or_disconnect)
static constexpr node::TxOrphanage::Usage TINY_TX_WEIGHT
static constexpr int64_t APPROX_WEIGHT_PER_INPUT
static void OrphanageSinglePeerEviction(benchmark::Bench &bench)
static void OrphanageMultiPeerEviction(benchmark::Bench &bench)
std::vector< CTransactionRef > vtx
Main entry point to nanobench's benchmarking facility.
static transaction_identifier FromUint256(const uint256 &id)
static int32_t GetTransactionWeight(const CTransaction &tx)
static const unsigned int MAX_BLOCK_WEIGHT
The maximum allowed weight for a block, see BIP 141 (network rule)
std::unique_ptr< TxOrphanage > MakeTxOrphanage() noexcept
Create a new TxOrphanage instance.
static constexpr unsigned int DEFAULT_MAX_ORPHANAGE_LATENCY_SCORE
Default value for TxOrphanage::m_max_global_latency_score.
static constexpr int64_t DEFAULT_RESERVED_ORPHAN_WEIGHT_PER_PEER
Default value for TxOrphanage::m_reserved_usage_per_peer.
static constexpr int32_t MAX_STANDARD_TX_WEIGHT
The maximum weight for transactions we're willing to relay/mine.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::shared_ptr< const CTransaction > CTransactionRef
A mutable version of CTransaction.
std::vector< CTxOut > vout
#define NO_THREAD_SAFETY_ANALYSIS
void BulkTransaction(CMutableTransaction &tx, int32_t target_weight)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.