MCPcopy Create free account
hub / github.com/LUX-Core/lux / CheckDiskSpace

Function CheckDiskSpace

src/main.cpp:5312–5321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5310}
5311
5312bool CheckDiskSpace(uint64_t nAdditionalBytes)
5313{
5314 uint64_t nFreeBytesAvailable = filesystem::space(GetDataDir()).available;
5315
5316 // Check for nMinDiskSpace bytes (currently 50MB)
5317 if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes)
5318 return AbortNode("Disk space is low!", _("Error: Disk space is low!"));
5319
5320 return true;
5321}
5322
5323FILE* OpenDiskFile(const CDiskBlockPos& pos, const char* prefix, bool fReadOnly)
5324{

Callers 5

AppInit2Function · 0.85
FlushStateToDiskFunction · 0.85
FindBlockPosFunction · 0.85
FindUndoPosFunction · 0.85

Calls 2

AbortNodeFunction · 0.85
_Function · 0.85

Tested by

no test coverage detected