| 255 | } |
| 256 | |
| 257 | int BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& alreadyAdded, |
| 258 | indexed_modified_transaction_set &mapModifiedTx) |
| 259 | { |
| 260 | int nDescendantsUpdated = 0; |
| 261 | for (CTxMemPool::txiter it : alreadyAdded) { |
| 262 | CTxMemPool::setEntries descendants; |
| 263 | mempool.CalculateDescendants(it, descendants); |
| 264 | // Insert all descendants (not yet in block) into the modified set |
| 265 | for (CTxMemPool::txiter desc : descendants) { |
| 266 | if (alreadyAdded.count(desc)) |
| 267 | continue; |
| 268 | ++nDescendantsUpdated; |
| 269 | modtxiter mit = mapModifiedTx.find(desc); |
| 270 | if (mit == mapModifiedTx.end()) { |
| 271 | CTxMemPoolModifiedEntry modEntry(desc); |
| 272 | modEntry.nSizeWithAncestors -= it->GetTxSize(); |
| 273 | modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); |
| 274 | modEntry.nSigOpCostWithAncestors -= it->GetSigOpCost(); |
| 275 | mapModifiedTx.insert(modEntry); |
| 276 | } else { |
| 277 | mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | return nDescendantsUpdated; |
| 282 | } |
| 283 | |
| 284 | // Skip entries in mapTx that are already in a block or are present |
| 285 | // in mapModifiedTx (which implies that the mapTx ancestor state is |
nothing calls this directly
no test coverage detected