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

Method freeBlock

source/core/StarBTreeDatabase.cpp:1003–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003void 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
1012auto BTreeDatabase::reserveBlock() -> BlockIndex {
1013 if (m_availableBlocks.empty()) {

Callers 4

storeIndexMethod · 0.80
deleteIndexMethod · 0.80
storeLeafMethod · 0.80
deleteLeafMethod · 0.80

Calls 3

containsMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected