Fix lack of block dir bug

This commit is contained in:
Jonathan "Duke" Leto
2019-12-09 08:15:18 -08:00
committed by Duke Leto
parent e8509dd525
commit 595ca09081

View File

@@ -1670,6 +1670,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fReindex = GetBoolArg("-reindex", false);
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
if (!boost::filesystem::exists(blocksDir))
{
boost::filesystem::create_directories(blocksDir);
}
// block tree db settings
int dbMaxOpenFiles = GetArg("-dbmaxopenfiles", DEFAULT_DB_MAX_OPEN_FILES);
bool dbCompression = GetBoolArg("-dbcompression", DEFAULT_DB_COMPRESSION);