| 143 | } |
| 144 | |
| 145 | void ThinBlockManager::removeIfExists(const uint256& h) { |
| 146 | if (!builders.count(h)) |
| 147 | return; |
| 148 | |
| 149 | // Take copy. Calling setAvailable causes workers to remove |
| 150 | // themself from set (changing it during iteration) |
| 151 | std::set<ThinBlockWorker*> workers = builders[h].workers; |
| 152 | for (ThinBlockWorker* w : workers) |
| 153 | w->stopWork(h); |
| 154 | builders.erase(h); |
| 155 | } |
| 156 | |
| 157 | std::vector<std::pair<int, ThinTx> > ThinBlockManager::getTxsMissing(const uint256& hash) const { |
| 158 | assert(builders.count(hash)); |
no test coverage detected