pub(crate) fn find_summit(
        &self,
        target_lvl: usize,
        candidate: &C::Hash,
        state: &State<C>,
    ) -> usize {
        let total_w = state.total_weight();
        let quorum = self.quorum_for_lvl(target_lvl, total_w);
        let latest = state.panorama().iter().map(Observation::correct).collect();
        let sec0 = Horizon::level0(candidate, state, &latest);
        let horizons_iter = iter::successors(Some(sec0), |sec| sec.next(quorum));
        horizons_iter.skip(1).take(target_lvl).count()
    }
/// Returns the number of levels of the highest summit with a quorum that a `target_lvl` summit
/// would need for the desired FTT. If the returned number is `target_lvl` that means the
/// `candidate` is finalized. If not, we need to retry with a lower `target_lvl`.
Returns the number of levels of the highest summit with a quorum that a `target_lvl` summit
would need for the desired FTT. If the returned number is `target_lvl` that means the
`candidate` is finalized. If not, we need to retry with a lower `target_lvl`.
Returns the number of levels of the highest summit with a quorum that a ` target_lvl ` summit would need for the desired FTT . If the returned number is ` target_lvl ` that means the ` candidate ` is finalized . If not we need to retry with a lower ` target_lvl ` .
pub(crate) fn find_summit(
        &self,
        target_lvl: usize,
        candidate: &C::Hash,
        state: &State<C>,
    ) -> usize {
        let total_w = state.total_weight();
        let quorum = self.quorum_for_lvl(target_lvl, total_w);
        let latest = state.panorama().iter().map(Observation::correct).collect();
        let sec0 = Horizon::level0(candidate, state, &latest);
        let horizons_iter = iter::successors(Some(sec0), |sec| sec.next(quorum));
        horizons_iter.skip(1).take(target_lvl).count()
    }
pub ( crate ) fn find_summit ( & self , target_lvl : usize , candidate : & C :: Hash , state : & State < C > , ) -> usize { let total_w = state . total_weight ( ) ; let quorum = self . quorum_for_lvl ( target_lvl , total_w ) ; let latest = state . panorama ( ) . iter ( ) . map ( Observation :: correct ) . collect ( ) ; let sec0 = Horizon :: level0 ( candidate , state , & latest ) ; let horizons_iter = iter :: successors ( Some ( sec0 ) , | sec | sec . next ( quorum ) ) ; horizons_iter . skip ( 1 ) . take ( target_lvl ) . count ( ) }
Returns the number of levels of the highest summit with a quorum that a `target_lvl` summit
would need for the desired FTT.
Returns the number of levels of the highest summit with a quorum that a ` target_lvl ` summit would need for the desired FTT .
&self
target_lvl
usize
candidate
&C::Hash
state
&State<C>
&self
target_lvl
usize
candidate
&C::Hash
state
&State<C>