| 161 | } |
| 162 | |
| 163 | void ThinBlockWorker::addWork(const uint256& newblock) { |
| 164 | assert(!newblock.IsNull()); |
| 165 | if (isWorkingOn(newblock)) |
| 166 | return; |
| 167 | blocks.insert(newblock); |
| 168 | mg.addWorker(newblock, *this); |
| 169 | } |
| 170 | |
| 171 | bool ThinBlockWorker::isOnlyWorker(const uint256& block) const { |
| 172 | return mg.numWorkers(block) <= 1; |