is_hdd update

This commit is contained in:
p8p
2018-08-25 04:16:01 -07:00
parent 91c7d68b2d
commit 9d6539923e
5 changed files with 61 additions and 53 deletions
+6 -2
View File
@@ -1200,8 +1200,12 @@ void BlockchainLMDB::open(const std::string& filename, const int db_flags)
throw DB_ERROR("Database could not be opened");
}
if (tools::is_hdd(filename.c_str()))
MCLOG_RED(el::Level::Warning, "global", "The blockchain is on a rotating drive: this will be very slow, use a SSD if possible");
boost::optional<bool> is_hdd_result = tools::is_hdd(filename.c_str());
if (is_hdd_result)
{
if (is_hdd_result.value())
MCLOG_RED(el::Level::Warning, "global", "The blockchain is on a rotating drive: this will be very slow, use a SSD if possible");
}
m_folder = filename;