fn duration()

in librabft-v2/src/pacemaker.rs [111:124]


    fn duration(&self, record_store: &dyn RecordStore<Context>, round: Round) -> Duration {
        let highest_commit_certificate_round = if record_store.highest_committed_round() > Round(0)
        {
            record_store.highest_committed_round() + 2
        } else {
            Round(0)
        };
        assert!(
            round > highest_commit_certificate_round,
            "Active round is higher than any QC round."
        );
        let n = round.0 - highest_commit_certificate_round.0;
        Duration(((self.delta.0 as f64) * (n as f64).powf(self.gamma)) as i64)
    }