| 988 | } |
| 989 | |
| 990 | auto BTreeDatabase::leafTailBlocks(BlockIndex leafPointer) -> List<BlockIndex> { |
| 991 | List<BlockIndex> tailBlocks; |
| 992 | DataStreamBuffer pointerBuffer(sizeof(BlockIndex)); |
| 993 | while (leafPointer != InvalidBlockIndex) { |
| 994 | readBlock(leafPointer, m_blockSize - sizeof(BlockIndex), pointerBuffer.ptr(), sizeof(BlockIndex)); |
| 995 | pointerBuffer.seek(0); |
| 996 | leafPointer = pointerBuffer.read<BlockIndex>(); |
| 997 | if (leafPointer != InvalidBlockIndex) |
| 998 | tailBlocks.append(leafPointer); |
| 999 | } |
| 1000 | return tailBlocks; |
| 1001 | } |
| 1002 | |
| 1003 | void BTreeDatabase::freeBlock(BlockIndex b) { |
| 1004 | if (m_uncommitted.contains(b)) |
no test coverage detected