diff options
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.inl')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index f16dad281..1d1cd3631 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -75,8 +75,6 @@ namespace cryptonote template<class t_core> bool t_cryptonote_protocol_handler<t_core>::deinit() { - - return true; } //------------------------------------------------------------------------------------------------------------------------ @@ -263,7 +261,7 @@ namespace cryptonote if(context.m_state == cryptonote_connection_context::state_synchronizing) return true; - if(m_core.have_block(hshd.top_id) && !(hshd.current_height < m_core.get_target_blockchain_height())) + if(m_core.have_block(hshd.top_id)) { context.m_state = cryptonote_connection_context::state_normal; if(is_inital) @@ -650,9 +648,9 @@ namespace cryptonote size_t count = 0; auto it = context.m_needed_objects.begin(); - size_t count_limit = BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; + const size_t count_limit = m_core.get_block_sync_size(); _note_c("net/req-calc" , "Setting count_limit: " << count_limit); - while(it != context.m_needed_objects.end() && count < BLOCKS_SYNCHRONIZING_DEFAULT_COUNT) + while(it != context.m_needed_objects.end() && count < count_limit) { if( !(check_having_blocks && m_core.have_block(*it))) { |