db_lmdb: warn about slowness when running off a spinning disk

This commit is contained in:
moneromooo-monero
2018-03-03 14:01:52 +00:00
parent 2619d966c6
commit 284fe6438d
3 changed files with 75 additions and 0 deletions
+3
View File
@@ -1178,6 +1178,9 @@ 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");
m_folder = filename;
#ifdef __OpenBSD__