core: fix automatic safe db sync mode switching

This commit is contained in:
moneromooo-monero
2018-05-28 12:12:19 +01:00
parent a2cef8cba4
commit 740da1ba95
2 changed files with 7 additions and 5 deletions
+1
View File
@@ -1346,6 +1346,7 @@ void BlockchainLMDB::sync()
void BlockchainLMDB::safesyncmode(const bool onoff)
{
MINFO("switching safe mode " << (onoff ? "on" : "off"));
mdb_env_set_flags(m_env, MDB_NOSYNC|MDB_MAPASYNC, !onoff);
}