| 776 | } |
| 777 | |
| 778 | void BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& alreadyAdded, |
| 779 | indexed_modified_transaction_set &mapModifiedTx) |
| 780 | { |
| 781 | for (const CTxMemPool::txiter it : alreadyAdded) { |
| 782 | CTxMemPool::setEntries descendants; |
| 783 | mempool.CalculateDescendants(it, descendants); |
| 784 | // Insert all descendants (not yet in block) into the modified set |
| 785 | for (CTxMemPool::txiter desc : descendants) { |
| 786 | if (alreadyAdded.count(desc)) |
| 787 | continue; |
| 788 | modtxiter mit = mapModifiedTx.find(desc); |
| 789 | if (mit == mapModifiedTx.end()) { |
| 790 | CTxMemPoolModifiedEntry modEntry(desc); |
| 791 | modEntry.nSizeWithAncestors -= it->GetTxSize(); |
| 792 | modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); |
| 793 | modEntry.nSigOpCostWithAncestors -= it->GetSigOpCost(); |
| 794 | mapModifiedTx.insert(modEntry); |
| 795 | } else { |
| 796 | mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); |
| 797 | } |
| 798 | } |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | // Skip entries in mapTx that are already in a block or are present |
| 803 | // in mapModifiedTx (which implies that the mapTx ancestor state is |
nothing calls this directly
no test coverage detected