v29.4-roots.4 · Commit 31: [PATCH 31/37] fix(mining): account for priority-selected ancestors
src/node/miner.cpp
Before: src/node/miner.cpp · After: src/node/miner.cpp
File metadata
index e039935a8165fe7185cdc28939485bd83aa0d3be..fe033cd64a6e318817b80a5e58c6b2d20f639ae7 100644
Download original patch · Release notes
Diff rows 1–10 of 10. 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/node/miner.cpp
CHANGED
|
@@ -442,6 +442,10 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
|
|
| 442 |
// Keep track of entries that failed inclusion, to avoid duplicate work
|
| 443 |
std::set<Txid> failedTx;
|
| 444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = mempool.mapTx.get<ancestor_score>().begin();
|
| 446 |
CTxMemPool::txiter iter;
|
| 447 |
|
|
|
|
| 442 |
// Keep track of entries that failed inclusion, to avoid duplicate work
|
| 443 |
std::set<Txid> failedTx;
|
| 444 |
|
| 445 |
+
// Start by adding all descendants of previously added txs to mapModifiedTx
|
| 446 |
+
// and modifying them for their already included ancestors
|
| 447 |
+
nDescendantsUpdated += UpdatePackagesForAdded(mempool, inBlock, mapModifiedTx);
|
| 448 |
+
|
| 449 |
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = mempool.mapTx.get<ancestor_score>().begin();
|
| 450 |
CTxMemPool::txiter iter;
|
| 451 |
|