Skip to content

Commit

Permalink
GH-459 Fix case where sync-fetch-span is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Aug 2, 2024
1 parent 4ff7151 commit 83cc7cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,9 @@ namespace eosio {

bool request_sent = false;
if( sync_last_requested_num != sync_known_lib_num ) {
uint32_t start = std::min(sync_next_expected_num, chain_info.lib_num+1);
uint32_t start = sync_next_expected_num;
if (sync_req_span > 1)
start = std::min(start, chain_info.lib_num+1);
uint32_t end = start + sync_req_span - 1;
if( end > sync_known_lib_num )
end = sync_known_lib_num;
Expand Down

0 comments on commit 83cc7cc

Please sign in to comment.