From 802c4bb0e4e7a94c07e5c06a3e993e104b529e52 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Thu, 22 Sep 2022 13:06:39 +0200 Subject: 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. --- src/cryptonote_core/cryptonote_core.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/cryptonote_core') diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 31e4e0414..545831199 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1656,10 +1656,6 @@ namespace cryptonote if (((size_t)-1) <= 0xffffffff && block_blob.size() >= 0x3fffffff) MWARNING("This block's size is " << block_blob.size() << ", closing on the 32 bit limit"); - // load json & DNS checkpoints every 10min/hour respectively, - // and verify them with respect to what blocks we already have - CHECK_AND_ASSERT_MES(update_checkpoints(), false, "One or more checkpoints loaded from json or dns conflicted with existing checkpoints."); - block lb; if (!b) { -- cgit v1.2.3