diff options
author | Crypto City <cryptocity@example.com> | 2022-09-01 15:15:54 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2023-05-05 18:11:57 +0000 |
commit | 503c3e06df476c0a5c69088292a92718385a0d8d (patch) | |
tree | f2c86f4053bb044d3ee227d23a50f88ce2b49074 /src/cryptonote_core/cryptonote_core.cpp | |
parent | Merge pull request #8760 (diff) | |
download | monero-503c3e06df476c0a5c69088292a92718385a0d8d.tar.xz |
core: do not force sync the db when finding a block in regtest mode
for a slight performance boost in functional tests
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |