mirror of
https://git.wownero.com/wownero/wownero.git
synced 2025-01-08 19:58:52 +00:00
db_lmdb: don't sync a read only DB
This would only throw
This commit is contained in:
parent
fa3ae1a16d
commit
668489a322
@ -1337,6 +1337,9 @@ void BlockchainLMDB::sync()
|
|||||||
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
||||||
check_open();
|
check_open();
|
||||||
|
|
||||||
|
if (is_read_only())
|
||||||
|
return;
|
||||||
|
|
||||||
// Does nothing unless LMDB environment was opened with MDB_NOSYNC or in part
|
// Does nothing unless LMDB environment was opened with MDB_NOSYNC or in part
|
||||||
// MDB_NOMETASYNC. Force flush to be synchronous.
|
// MDB_NOMETASYNC. Force flush to be synchronous.
|
||||||
if (auto result = mdb_env_sync(m_env, true))
|
if (auto result = mdb_env_sync(m_env, true))
|
||||||
|
Loading…
Reference in New Issue
Block a user