| 1001 | } |
| 1002 | |
| 1003 | void BTreeDatabase::freeBlock(BlockIndex b) { |
| 1004 | if (m_uncommitted.contains(b)) |
| 1005 | m_uncommitted.remove(b); |
| 1006 | if (m_uncommittedWrites.contains(b)) |
| 1007 | m_uncommittedWrites.remove(b); |
| 1008 | |
| 1009 | m_availableBlocks.add(b); |
| 1010 | } |
| 1011 | |
| 1012 | auto BTreeDatabase::reserveBlock() -> BlockIndex { |
| 1013 | if (m_availableBlocks.empty()) { |
no test coverage detected