fn schedule_timer(&mut self, vidx: ValidatorIndex, effects: &[Effect<TestContext>]) {
            let new_timestamps: Vec<Timestamp> = effects
                .iter()
                .filter_map(|eff| {
                    if let Effect::ScheduleTimer(timestamp) = eff {
                        Some(*timestamp)
                    } else {
                        None
                    }
                })
                .collect();
            match *new_timestamps {
                [] => (),
                [timestamp] => {
                    let _ = self.timers.insert((timestamp, vidx));
                }
                _ => panic!(
                    "Expected at most one timer to be scheduled: {:?}",
                    new_timestamps
                ),
            }
        }
/// Schedules new timers, if any was returned as an effect.
Schedules new timers, if any was returned as an effect.
Schedules new timers if any was returned as an effect .
fn schedule_timer(&mut self, vidx: ValidatorIndex, effects: &[Effect<TestContext>]) {
            let new_timestamps: Vec<Timestamp> = effects
                .iter()
                .filter_map(|eff| {
                    if let Effect::ScheduleTimer(timestamp) = eff {
                        Some(*timestamp)
                    } else {
                        None
                    }
                })
                .collect();
            match *new_timestamps {
                [] => (),
                [timestamp] => {
                    let _ = self.timers.insert((timestamp, vidx));
                }
                _ => panic!(
                    "Expected at most one timer to be scheduled: {:?}",
                    new_timestamps
                ),
            }
        }
fn schedule_timer ( & mut self , vidx : ValidatorIndex , effects : & [ Effect < TestContext > ] ) { let new_timestamps : Vec < Timestamp > = effects . iter ( ) . filter_map ( | eff | { if let Effect :: ScheduleTimer ( timestamp ) = eff { Some ( * timestamp ) } else { None } } ) . collect ( ) ; match * new_timestamps { [ ] => ( ) , [ timestamp ] => { let _ = self . timers . insert ( ( timestamp , vidx ) ) ; } _ => panic ! ( " " new_timestamps ) , } }
Schedules new timers, if any was returned as an effect.
Schedules new timers if any was returned as an effect .
&mut self
vidx
ValidatorIndex
effects
&[Effect<TestContext>]
&mut self
vidx
ValidatorIndex
effects
&[Effect<TestContext>]