core: do not force sync the db when finding a block in regtest mode

for a slight performance boost in functional tests
This commit is contained in:
Crypto City 2022-09-01 15:15:54 +00:00 committed by moneromooo-monero
parent a2e8d1d427
commit 503c3e06df
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -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();