Merge pull request #3876

740da1b core: fix automatic safe db sync mode switching (moneromooo-monero)
e942d34 protocol: do not switch to unsafe sync mode for just a few blocks (moneromooo-monero)
This commit is contained in:
luigi1111
2018-05-30 15:46:13 -05:00
3 changed files with 9 additions and 6 deletions

View File

@@ -1397,6 +1397,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);
}