Skip to content

Commit

Permalink
GH-670 Update sync_active_time on any received block as it is only ap…
Browse files Browse the repository at this point in the history
…plicable when no blocks are being received.
  • Loading branch information
heifner committed Aug 29, 2024
1 parent c5f0418 commit 7617cd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,6 @@ namespace eosio {
// called from connection strand
void sync_manager::sync_wait(const connection_ptr& c) {
++sync_timers_active;
sync_active_time = std::chrono::steady_clock::now(); // reset when we receive a block
peer_dlog(c, "sync wait, active_timers ${t}", ("t", sync_timers_active.load()));
}

Expand Down Expand Up @@ -2484,6 +2483,7 @@ namespace eosio {
return;
}
c->latest_blk_time = std::chrono::system_clock::now();
sync_active_time = std::chrono::steady_clock::now(); // reset when we receive a block
if (blk_applied)
c->block_status_monitor_.accepted();
if (blk_latency.count() < config::block_interval_us && c->peer_syncing_from_us) {
Expand Down

0 comments on commit 7617cd3

Please sign in to comment.