mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 07:52:25 +00:00
db_lmdb: don't sync a read only DB
This would only throw
This commit is contained in:
parent
eed4dba880
commit
ee31383a52
1 changed files with 3 additions and 0 deletions
|
@ -1391,6 +1391,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))
|
||||
|
|
Loading…
Reference in a new issue