From 503c3e06df476c0a5c69088292a92718385a0d8d Mon Sep 17 00:00:00 2001 From: Crypto City Date: Thu, 1 Sep 2022 15:15:54 +0000 Subject: [PATCH] core: do not force sync the db when finding a block in regtest mode for a slight performance boost in functional tests --- src/cryptonote_core/cryptonote_core.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 72ddd0dc9..30750b077 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1563,7 +1563,8 @@ namespace cryptonote return false; } m_blockchain_storage.add_new_block(b, bvc); - cleanup_handle_incoming_blocks(true); + const bool force_sync = m_nettype != FAKECHAIN; + cleanup_handle_incoming_blocks(force_sync); //anyway - update miner template update_miner_block_template(); m_miner.resume();