v29.4-roots.2 · Commit 8: [PATCH 08/21] ci: restore assurance and isolate Core fixtures
src/bench/mempool_stress.cpp
Before: src/bench/mempool_stress.cpp · After: src/bench/mempool_stress.cpp
File metadata
index fbac25db5f5c85c562217d4608d4016a55343b2e..0cafde4c2dee03997d30b43c78ce353aaf0fd523 100644
Download original patch · Release notes
Diff rows 1–17 of 17. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/bench/mempool_stress.cpp
CHANGED
|
@@ -24,12 +24,16 @@ class CCoinsViewCache;
|
|
| 24 |
static void AddTx(const CTransactionRef& tx, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
|
| 25 |
{
|
| 26 |
int64_t nTime = 0;
|
|
|
|
| 27 |
unsigned int nHeight = 1;
|
| 28 |
uint64_t sequence = 0;
|
| 29 |
bool spendsCoinbase = false;
|
| 30 |
unsigned int sigOpCost = 4;
|
| 31 |
LockPoints lp;
|
| 32 |
-
AddToMempool(pool, CTxMemPoolEntry(tx, 1000, nTime, nHeight, sequence, spendsCoinbase, sigOpCost, lp));
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
struct Available {
|
|
|
|
| 24 |
static void AddTx(const CTransactionRef& tx, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
|
| 25 |
{
|
| 26 |
int64_t nTime = 0;
|
| 27 |
+
constexpr double coin_age{10.0};
|
| 28 |
unsigned int nHeight = 1;
|
| 29 |
uint64_t sequence = 0;
|
| 30 |
bool spendsCoinbase = false;
|
| 31 |
unsigned int sigOpCost = 4;
|
| 32 |
LockPoints lp;
|
| 33 |
+
AddToMempool(pool, CTxMemPoolEntry(tx, 1000, nTime, nHeight, sequence, {
|
| 34 |
+
.inputs_coin_age = coin_age,
|
| 35 |
+
.in_chain_input_value = tx->GetValueOut(),
|
| 36 |
+
}, spendsCoinbase, /*extra_weight=*/0, sigOpCost, lp));
|
| 37 |
}
|
| 38 |
|
| 39 |
struct Available {
|