diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2022-09-22 13:06:39 +0200 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2022-09-22 13:06:39 +0200 |
commit | 802c4bb0e4e7a94c07e5c06a3e993e104b529e52 (patch) | |
tree | d9537185b6f920b85c1cb8aa6f192fd773996f2f /tests/core_proxy | |
parent | Merge pull request #8545 (diff) | |
download | monero-802c4bb0e4e7a94c07e5c06a3e993e104b529e52.tar.xz |
Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
Diffstat (limited to 'tests/core_proxy')
-rw-r--r-- | tests/core_proxy/core_proxy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index fe10dde6e..6d0597ad9 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -90,6 +90,7 @@ namespace tests bool get_test_drop_download_height() {return true;} bool prepare_handle_incoming_blocks(const std::vector<cryptonote::block_complete_entry> &blocks_entry, std::vector<cryptonote::block> &blocks) { return true; } bool cleanup_handle_incoming_blocks(bool force_sync = false) { return true; } + bool update_checkpoints(const bool skip_dns = false) { return true; } uint64_t get_target_blockchain_height() const { return 1; } size_t get_block_sync_size(uint64_t height) const { return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; } virtual void on_transactions_relayed(epee::span<const cryptonote::blobdata> tx_blobs, cryptonote::relay_method tx_relay) {} |