fn handle_standstill_alert_timer(&mut self, now: Timestamp) -> ProtocolOutcomes<I, C> {
        if self.evidence_only || self.finalized_switch_block() {
            // Era has ended and no further progress is expected, or shutdown on standstill is
            // turned off.
            return vec![];
        }
        let timeout = match self.config.standstill_timeout {
            None => return vec![],
            Some(timeout) => timeout,
        };
        if self.last_panorama == *self.highway.state().panorama() {
            info!(
                instance_id = ?self.highway.instance_id(),
                "no progress in the last {}, raising standstill alert",
                timeout,
            );
            return vec![ProtocolOutcome::StandstillAlert]; // No progress within the timeout.
        }
        debug!(
            instance_id = ?self.highway.instance_id(),
            "progress detected; scheduling next standstill check in {}",
            timeout,
        );
        // Record the current panorama and schedule the next standstill check.
        self.last_panorama = self.highway.state().panorama().clone();
        vec![ProtocolOutcome::ScheduleTimer(
            now + timeout,
            TIMER_ID_STANDSTILL_ALERT,
        )]
    }
/// Returns a `StandstillAlert` if no progress was made; otherwise schedules the next check.
Returns a `StandstillAlert` if no progress was made; otherwise schedules the next check.
Returns a ` StandstillAlert ` if no progress was made ; otherwise schedules the next check .
fn handle_standstill_alert_timer(&mut self, now: Timestamp) -> ProtocolOutcomes<I, C> {
        if self.evidence_only || self.finalized_switch_block() {
            // Era has ended and no further progress is expected, or shutdown on standstill is
            // turned off.
            return vec![];
        }
        let timeout = match self.config.standstill_timeout {
            None => return vec![],
            Some(timeout) => timeout,
        };
        if self.last_panorama == *self.highway.state().panorama() {
            info!(
                instance_id = ?self.highway.instance_id(),
                "no progress in the last {}, raising standstill alert",
                timeout,
            );
            return vec![ProtocolOutcome::StandstillAlert]; // No progress within the timeout.
        }
        debug!(
            instance_id = ?self.highway.instance_id(),
            "progress detected; scheduling next standstill check in {}",
            timeout,
        );
        // Record the current panorama and schedule the next standstill check.
        self.last_panorama = self.highway.state().panorama().clone();
        vec![ProtocolOutcome::ScheduleTimer(
            now + timeout,
            TIMER_ID_STANDSTILL_ALERT,
        )]
    }
fn handle_standstill_alert_timer ( & mut self , now : Timestamp ) -> ProtocolOutcomes < I , C > { if self . evidence_only || self . finalized_switch_block ( ) { // Era has ended and no further progress is expected, or shutdown on standstill is // turned off. return vec ! [ ] ; } let timeout = match self . config . standstill_timeout { None => return vec ! [ ] , Some ( timeout ) => timeout , } ; if self . last_panorama == * self . highway . state ( ) . panorama ( ) { info ! ( instance_id self highway instance_id ( ) " " timeout ) ; return vec ! [ ProtocolOutcome StandstillAlert ] ; // No progress within the timeout. } debug ! ( instance_id self highway instance_id ( ) " " timeout ) ; // Record the current panorama and schedule the next standstill check. self . last_panorama = self . highway . state ( ) . panorama ( ) . clone ( ) ; vec ! [ ProtocolOutcome ScheduleTimer ( now timeout TIMER_ID_STANDSTILL_ALERT ) ] }
Returns a `StandstillAlert` if no progress was made; otherwise schedules the next check.
Returns a ` StandstillAlert ` if no progress was made ; otherwise schedules the next check .
&mut self
now
Timestamp
&mut self
now
Timestamp