| 212 | } |
| 213 | |
| 214 | void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors) |
| 215 | { |
| 216 | setEntries parentIters = GetMemPoolParents(it); |
| 217 | // add or remove this tx as a child of each parent |
| 218 | for (txiter piter : parentIters) { |
| 219 | UpdateChild(piter, it, add); |
| 220 | } |
| 221 | const int64_t updateCount = (add ? 1 : -1); |
| 222 | const int64_t updateSize = updateCount * it->GetTxSize(); |
| 223 | const CAmount updateFee = updateCount * it->GetModifiedFee(); |
| 224 | for (txiter ancestorIt : setAncestors) { |
| 225 | mapTx.modify(ancestorIt, update_descendant_state(updateSize, updateFee, updateCount)); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | void CTxMemPool::UpdateEntryForAncestors(txiter it, const setEntries &setAncestors) |
| 230 | { |
nothing calls this directly
no test coverage detected