diff --git a/crates/task-impls/src/view_sync.rs b/crates/task-impls/src/view_sync.rs index 8d50a40df3..d31e9b6219 100644 --- a/crates/task-impls/src/view_sync.rs +++ b/crates/task-impls/src/view_sync.rs @@ -484,11 +484,12 @@ impl< self.num_timeouts_tracked, *view_number ); - if self.num_timeouts_tracked > 3 { + if self.num_timeouts_tracked >= 3 { error!("Too many consecutive timeouts! This shouldn't happen"); } - if self.num_timeouts_tracked > 2 { + if self.num_timeouts_tracked >= 2 { + error!("Starting view sync protocol for view {}", *view_number + 1); // Start polling for view sync certificates self.network .inject_consensus_info(ConsensusIntentEvent::PollForViewSyncCertificate( @@ -507,9 +508,9 @@ impl< let subscribe_view = if self.membership.get_leader(TYPES::Time::new(next_view)) == self.public_key { - next_view - } else { next_view + 1 + } else { + next_view }; // Subscribe to the next view just in case there is progress being made self.network @@ -756,6 +757,12 @@ impl, A: ConsensusApi + .publish(HotShotEvent::ViewSyncFinalizeVoteSend(vote)) .await; } + + error!( + "View sync protocol has received view sync evidence to update the view to {}", + *self.next_view + ); + self.event_stream .publish(HotShotEvent::ViewChange(self.next_view)) .await;