aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 07db59796..37bd6e810 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3378,7 +3378,7 @@ bool Blockchain::cleanup_handle_incoming_blocks(bool force_sync)
store_blockchain();
m_sync_counter = 0;
}
- else if (m_sync_counter >= m_db_blocks_per_sync)
+ else if (m_db_blocks_per_sync && m_sync_counter >= m_db_blocks_per_sync)
{
if(m_db_sync_mode == db_async)
{