fn handle_timer(
            &mut self,
            vidx: ValidatorIndex,
            timestamp: Timestamp,
        ) -> Vec<Effect<TestContext>> {
            // Remove the timer from the queue if it has been scheduled.
            let _ = self.timers.remove(&(timestamp, vidx));
            let validator = &mut self.active_validators[vidx];
            let effects = validator.handle_timer(timestamp, &self.state, self.instance_id);
            self.schedule_timer(vidx, &effects);
            self.add_new_unit(&effects);
            effects
        }
/// Force the validator to handle timer that may not have been scheduled by it.
/// Useful for testing.
/// Returns effects created when handling the timer.
Force the validator to handle timer that may not have been scheduled by it.
Useful for testing.
Returns effects created when handling the timer.
Force the validator to handle timer that may not have been scheduled by it . Useful for testing . Returns effects created when handling the timer .
fn handle_timer(
            &mut self,
            vidx: ValidatorIndex,
            timestamp: Timestamp,
        ) -> Vec<Effect<TestContext>> {
            // Remove the timer from the queue if it has been scheduled.
            let _ = self.timers.remove(&(timestamp, vidx));
            let validator = &mut self.active_validators[vidx];
            let effects = validator.handle_timer(timestamp, &self.state, self.instance_id);
            self.schedule_timer(vidx, &effects);
            self.add_new_unit(&effects);
            effects
        }
fn handle_timer ( & mut self , vidx : ValidatorIndex , timestamp : Timestamp , ) -> Vec < Effect < TestContext > > { // Remove the timer from the queue if it has been scheduled. let _ = self . timers . remove ( & ( timestamp , vidx ) ) ; let validator = & mut self . active_validators [ vidx ] ; let effects = validator . handle_timer ( timestamp , & self . state , self . instance_id ) ; self . schedule_timer ( vidx , & effects ) ; self . add_new_unit ( & effects ) ; effects }
Force the validator to handle timer that may not have been scheduled by it.
Force the validator to handle timer that may not have been scheduled by it .
&mut self
vidx
ValidatorIndex
timestamp
Timestamp
&mut self
vidx
ValidatorIndex
timestamp
Timestamp