| 235 | } |
| 236 | |
| 237 | void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors) |
| 238 | { |
| 239 | setEntries parentIters = GetMemPoolParents(it); |
| 240 | // add or remove this tx as a child of each parent |
| 241 | for (txiter piter : parentIters) { |
| 242 | UpdateChild(piter, it, add); |
| 243 | } |
| 244 | const int64_t updateCount = (add ? 1 : -1); |
| 245 | const int64_t updateSize = updateCount * it->GetTxSize(); |
| 246 | const CAmount updateFee = updateCount * it->GetModifiedFee(); |
| 247 | for (txiter ancestorIt : setAncestors) { |
| 248 | mapTx.modify(ancestorIt, update_descendant_state(updateSize, updateFee, updateCount)); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void CTxMemPool::UpdateEntryForAncestors(txiter it, const setEntries &setAncestors) |
| 253 | { |
nothing calls this directly
no test coverage detected