15 unsigned int nHeight = 1;
16 bool spendsCoinbase =
false;
17 unsigned int sigOpCost = 4;
20 tx, nFee, nTime, nHeight,
21 spendsCoinbase, sigOpCost, lp));
32 tx1.
vin[0].scriptWitness.stack.push_back({1});
35 tx1.
vout[0].nValue = 10 * COIN;
40 tx2.
vin[0].scriptWitness.stack.push_back({2});
43 tx2.
vout[0].nValue = 10 * COIN;
49 tx3.
vin[0].scriptWitness.stack.push_back({3});
52 tx3.
vout[0].nValue = 10 * COIN;
56 tx4.
vin[0].prevout.SetNull();
58 tx4.
vin[0].scriptWitness.stack.push_back({4});
59 tx4.
vin[1].prevout.SetNull();
61 tx4.
vin[1].scriptWitness.stack.push_back({4});
64 tx4.
vout[0].nValue = 10 * COIN;
66 tx4.
vout[1].nValue = 10 * COIN;
72 tx5.
vin[0].scriptWitness.stack.push_back({4});
73 tx5.
vin[1].prevout.SetNull();
75 tx5.
vin[1].scriptWitness.stack.push_back({5});
78 tx5.
vout[0].nValue = 10 * COIN;
80 tx5.
vout[1].nValue = 10 * COIN;
86 tx6.
vin[0].scriptWitness.stack.push_back({4});
87 tx6.
vin[1].prevout.SetNull();
89 tx6.
vin[1].scriptWitness.stack.push_back({6});
92 tx6.
vout[0].nValue = 10 * COIN;
94 tx6.
vout[1].nValue = 10 * COIN;
100 tx7.
vin[0].scriptWitness.stack.push_back({5});
103 tx7.
vin[1].scriptWitness.stack.push_back({6});
106 tx7.
vout[0].nValue = 10 * COIN;
108 tx7.
vout[1].nValue = 10 * COIN;
122 AddTx(tx1_r, 10000LL, pool);
123 AddTx(tx2_r, 5000LL, pool);
124 AddTx(tx3_r, 20000LL, pool);
125 AddTx(tx4_r, 7000LL, pool);
126 AddTx(tx5_r, 1000LL, pool);
127 AddTx(tx6_r, 1100LL, pool);
128 AddTx(tx7_r, 9000LL, pool);
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
Compute the virtual transaction size (weight reinterpreted as bytes).
BENCHMARK(MempoolEviction, 41000)
size_t DynamicMemoryUsage() const
void TrimToSize(size_t sizelimit, std::vector< COutPoint > *pvNoSpendsRemaining=nullptr)
Remove transactions from the mempool until its dynamic size is <= sizelimit.
std::shared_ptr< const CTransaction > CTransactionRef
CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in-mempool...
int64_t CAmount
Amount in satoshis (Can be negative)
An outpoint - a combination of a transaction hash and an index n into its vout.
std::vector< CTxOut > vout
#define EXCLUSIVE_LOCKS_REQUIRED(...)
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
uint256 GetHash() const
Compute the hash of this CMutableTransaction.
Serialized script, used inside transaction inputs and outputs.
A mutable version of CTransaction.