9#include <test/util/setup_common.h>
26 const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
30 tx1.
vin[0].scriptSig = CScript() <<
OP_1;
37 tx2.
vin[0].scriptSig = CScript() <<
OP_2;
44 tx3.
vin[0].prevout = COutPoint(tx2.
GetId(), 0);
45 tx3.
vin[0].scriptSig = CScript() <<
OP_2;
52 tx4.
vin[0].prevout = COutPoint();
53 tx4.
vin[0].scriptSig = CScript() <<
OP_4;
54 tx4.
vin[1].prevout = COutPoint();
55 tx4.
vin[1].scriptSig = CScript() <<
OP_4;
64 tx5.
vin[0].prevout = COutPoint(tx4.
GetId(), 0);
65 tx5.
vin[0].scriptSig = CScript() <<
OP_4;
66 tx5.
vin[1].prevout = COutPoint();
67 tx5.
vin[1].scriptSig = CScript() <<
OP_5;
76 tx6.
vin[0].prevout = COutPoint(tx4.
GetId(), 1);
77 tx6.
vin[0].scriptSig = CScript() <<
OP_4;
78 tx6.
vin[1].prevout = COutPoint();
79 tx6.
vin[1].scriptSig = CScript() <<
OP_6;
88 tx7.
vin[0].prevout = COutPoint(tx5.
GetId(), 0);
89 tx7.
vin[0].scriptSig = CScript() <<
OP_5;
90 tx7.
vin[1].prevout = COutPoint(tx6.
GetId(), 0);
91 tx7.
vin[1].scriptSig = CScript() <<
OP_6;
static constexpr Amount SATOSHI
static constexpr Amount COIN
#define Assert(val)
Identity function.
A mutable version of CTransaction.
TxId GetId() const
Compute the id and hash of this CMutableTransaction.
std::vector< CTxOut > vout
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
void TrimToSize(size_t sizelimit, std::vector< COutPoint > *pvNoSpendsRemaining=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs)
Remove transactions from the mempool until its dynamic size is <= sizelimit.
size_t DynamicMemoryUsage() const
static RCUPtr make(Args &&...args)
Construct a new object that is owned by the pointer.
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)
static void AddTx(const CTransactionRef &tx, const Amount &nFee, CTxMemPool &pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main
static void MempoolEviction(benchmark::Bench &bench)
static CTransactionRef MakeTransactionRef()
std::shared_ptr< const CTransaction > CTransactionRef
size_t GetSerializeSize(const T &t, int nVersion=0)
#define EXCLUSIVE_LOCKS_REQUIRED(...)
#define NO_THREAD_SAFETY_ANALYSIS
static const int PROTOCOL_VERSION
network protocol versioning