Remove the specified positions from this DepGraph. * * The specified positions will no longer be part of Positions(), and dependencies with them are * removed. Note that due to DepGraph only tracking ancestors/descendants (and not direct * dependencies), if a parent is removed while a grandparent remains, the grandparent will * remain an ancestor. * * Complexity:
| 158 | * Complexity: O(N) where N=TxCount(). |
| 159 | */ |
| 160 | void RemoveTransactions(const SetType& del) noexcept |
| 161 | { |
| 162 | m_used -= del; |
| 163 | // Remove now-unused trailing entries. |
| 164 | while (!entries.empty() && !m_used[entries.size() - 1]) { |
| 165 | entries.pop_back(); |
| 166 | } |
| 167 | // Remove the deleted transactions from ancestors/descendants of other transactions. Note |
| 168 | // that the deleted positions will retain old feerate and dependency information. This does |
| 169 | // not matter as they will be overwritten by AddTransaction if they get used again. |
| 170 | for (auto& entry : entries) { |
| 171 | entry.ancestors &= m_used; |
| 172 | entry.descendants &= m_used; |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | /** Modify this transaction graph, adding multiple parents to a specified child. |
| 177 | * |