From 1e586d752453eea5253569228e8c315604607b30 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Thu, 8 Aug 2024 03:29:39 +0000 Subject: [PATCH] cryptonote: sync batches instead of single blocks (#24) * cryptonote: BSS new fork height * cryptonote: pre-fork BSS=100, postfork=5 --- src/cryptonote_config.h | 4 ++-- src/cryptonote_core/cryptonote_core.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index e14ef54499..4d7ad05c81 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -95,8 +95,8 @@ #define BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT 10000 //by default, blocks ids count in synchronizing #define BLOCKS_IDS_SYNCHRONIZING_MAX_COUNT 25000 //max blocks ids count in synchronizing -#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT_PRE_V4 20 //by default, blocks count in blocks downloading -#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT 1 //by default, blocks count in blocks downloading +#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT_PRE_V4 100 //by default, blocks count in blocks downloading +#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT 5 //by default, blocks count in blocks downloading #define BLOCKS_SYNCHRONIZING_MAX_COUNT 2048 //must be a power of 2, greater than 128, equal to SEEDHASH_EPOCH_BLOCKS #define CRYPTONOTE_MEMPOOL_TX_LIVETIME (86400*3) //seconds, three days diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 664505871f..fd2425fffe 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -943,7 +943,7 @@ namespace cryptonote //----------------------------------------------------------------------------------------------- size_t core::get_block_sync_size(uint64_t height) const { - static const uint64_t quick_height = m_nettype == TESTNET ? 2508830 : m_nettype == MAINNET ? 1220516 : 0; // 2508830 is stressnet hardfork height + static const uint64_t quick_height = m_nettype == TESTNET ? 2557352 : m_nettype == MAINNET ? 1220516 : 0; // 2557352 is stressnet 251 hardfork height size_t res = 0; if (block_sync_size > 0) res = block_sync_size;