40 const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
45 tx1.
vin[0].scriptWitness.stack.push_back({1});
53 tx2.
vin[0].scriptWitness.stack.push_back({2});
62 tx3.
vin[0].scriptWitness.stack.push_back({3});
69 tx4.
vin[0].prevout.SetNull();
71 tx4.
vin[0].scriptWitness.stack.push_back({4});
72 tx4.
vin[1].prevout.SetNull();
74 tx4.
vin[1].scriptWitness.stack.push_back({4});
85 tx5.
vin[0].scriptWitness.stack.push_back({4});
86 tx5.
vin[1].prevout.SetNull();
88 tx5.
vin[1].scriptWitness.stack.push_back({5});
99 tx6.
vin[0].scriptWitness.stack.push_back({4});
100 tx6.
vin[1].prevout.SetNull();
102 tx6.
vin[1].scriptWitness.stack.push_back({6});
113 tx7.
vin[0].scriptWitness.stack.push_back({5});
116 tx7.
vin[1].scriptWitness.stack.push_back({6});
142 pool.TrimToSize(
pool.DynamicMemoryUsage() * 3 / 4);
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
#define Assert(val)
Identity function.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in-mempool...
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
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.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
BENCHMARK(MempoolEviction)
TryAddToMempool(pool, CTxMemPoolEntry(tx, nFee, nTime, nHeight, sequence, spendsCoinbase, sigOpCost, lp))
static void MempoolEviction(benchmark::Bench &bench)
static void AddTx(const CTransactionRef &tx, const CAmount &nFee, CTxMemPool &pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop)
Compute the virtual transaction size (weight reinterpreted as bytes).
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::shared_ptr< const CTransaction > CTransactionRef
A mutable version of CTransaction.
std::vector< CTxOut > vout
Txid GetHash() const
Compute the hash of this CMutableTransaction.
#define EXCLUSIVE_LOCKS_REQUIRED(...)
#define NO_THREAD_SAFETY_ANALYSIS