MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / leafTailBlocks

Method leafTailBlocks

source/core/StarBTreeDatabase.cpp:990–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

988}
989
990auto 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
1003void BTreeDatabase::freeBlock(BlockIndex b) {
1004 if (m_uncommitted.contains(b))

Callers 3

operator()Method · 0.80
storeLeafMethod · 0.80
deleteLeafMethod · 0.80

Calls 3

ptrMethod · 0.45
seekMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected