| 434 | { |
| 435 | bool wasFull = false; |
| 436 | DEV_WRITE_GUARDED(m_lock) |
| 437 | { |
| 438 | DEV_INVARIANT_CHECK; |
| 439 | wasFull = knownFull(); |
| 440 | if (m_drainingSet.empty()) |
| 441 | { |
| 442 | m_drainingDifficulty = 0; |
| 443 | DEV_GUARDED(m_verification) |
| 444 | o_out = m_verified.dequeueMultiple(min<unsigned>(_max, m_verified.count())); |
| 445 | |
| 446 | for (auto const& bs: o_out) |
| 447 | { |
| 448 | // TODO: @optimise use map<h256, bytes> rather than vector<bytes> & set<h256>. |
| 449 | auto h = bs.verified.info.hash(); |
| 450 | m_drainingSet.insert(h); |
| 451 | m_drainingDifficulty += bs.verified.info.difficulty(); |
| 452 | m_readySet.erase(h); |
| 453 | } |
| 454 | } |
| 455 | } |
| 456 | if (wasFull && !knownFull()) |
| 457 | m_onRoomAvailable(); |
| 458 | } |
nothing calls this directly
no test coverage detected