diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-07-27 14:30:57 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-07-27 14:30:57 -0500 |
commit | 0dddfeacc982ad208808e3a828163837fc4aba38 (patch) | |
tree | cfb446fdfbfa6a16e0c1273205eeccaf852107eb | |
parent | Merge pull request #4126 (diff) | |
parent | db_lmdb: don't sync a read only DB (diff) | |
download | monero-0dddfeacc982ad208808e3a828163837fc4aba38.tar.xz |
Merge pull request #4129
ee31383 db_lmdb: don't sync a read only DB (moneromooo-monero)
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index 5d1679c0c..a6eb3d880 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -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)) |