Merge pull request #4129

ee31383 db_lmdb: don't sync a read only DB (moneromooo-monero)
This commit is contained in:
luigi1111 2018-07-27 14:30:57 -05:00
commit 0dddfeacc9
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -1413,6 +1413,9 @@ void BlockchainLMDB::sync()
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
check_open();
if (is_read_only())
return;
// Does nothing unless LMDB environment was opened with MDB_NOSYNC or in part
// MDB_NOMETASYNC. Force flush to be synchronous.
if (auto result = mdb_env_sync(m_env, true))