Skip to content

Commit

Permalink
GH-459 Reset sync_source when sync complete
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Aug 5, 2024
1 parent 261ae23 commit 95ca20b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,7 @@ namespace eosio {
auto lib = my_impl->get_chain_lib_num();
sync_last_requested_num = 0;
sync_next_expected_num = std::max(sync_next_expected_num, lib + 1);
sync_source.reset();
request_next_chunk();
}
}
Expand Down Expand Up @@ -2499,6 +2500,7 @@ namespace eosio {
if (blk_num >= c->sync_last_requested_block) {
peer_dlog(c, "calling cancel_sync_wait, block ${b}, sync_last_requested_block ${lrb}",
("b", blk_num)("lrb", c->sync_last_requested_block));
sync_source.reset();
c->cancel_sync_wait();
} else {
peer_dlog(c, "calling sync_wait, block ${b}", ("b", blk_num));
Expand Down

0 comments on commit 95ca20b

Please sign in to comment.