added fix for #2699

added logging info for WRITEMAP

WRITEMAP loggin info - better version
This commit is contained in:
ston1th 2017-10-22 13:38:19 +02:00 committed by moneromooo-monero
parent 2a32a25fa0
commit 44a2b23b98
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -1117,6 +1117,12 @@ void BlockchainLMDB::open(const std::string& filename, const int db_flags)
m_folder = filename;
#ifdef __OpenBSD__
if ((mdb_flags & MDB_WRITEMAP) == 0) {
MCLOG_RED(el::Level::Info, "global", "Running on OpenBSD: forcing WRITEMAP");
mdb_flags |= MDB_WRITEMAP;
}
#endif
// set up lmdb environment
if ((result = mdb_env_create(&m_env)))
throw0(DB_ERROR(lmdb_error("Failed to create lmdb environment: ", result).c_str()));