v30.3-roots.1 · Commit 31: [PATCH 31/68] fix(mining): account for priority-selected ancestors
src/node/miner.cpp
Before: src/node/miner.cpp · After: src/node/miner.cpp
File metadata
index 2f4b30c1262cc635fb830de1269c080a57025d84..3618dc5819352c3e1c367e2625760b81932934cf 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
|
@@ -445,6 +445,10 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
|
|
| 445 |
// Keep track of entries that failed inclusion, to avoid duplicate work
|
| 446 |
std::set<Txid> failedTx;
|
| 447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = mempool.mapTx.get<ancestor_score>().begin();
|
| 449 |
CTxMemPool::txiter iter;
|
| 450 |
|
|
|
|
| 445 |
// Keep track of entries that failed inclusion, to avoid duplicate work
|
| 446 |
std::set<Txid> failedTx;
|
| 447 |
|
| 448 |
+
// Start by adding all descendants of previously added txs to mapModifiedTx
|
| 449 |
+
// and modifying them for their already included ancestors
|
| 450 |
+
nDescendantsUpdated += UpdatePackagesForAdded(mempool, inBlock, mapModifiedTx);
|
| 451 |
+
|
| 452 |
CTxMemPool::indexed_transaction_set::index<ancestor_score>::type::iterator mi = mempool.mapTx.get<ancestor_score>().begin();
|
| 453 |
CTxMemPool::txiter iter;
|
| 454 |
|