pub(crate) fn has_all_endorsements<I: IntoIterator<Item = ValidatorIndex>>(
        &self,
        unit: &C::Hash,
        v_ids: I,
    ) -> bool {
        if self.endorsements.contains_key(unit) {
            true // We have enough endorsements for this unit.
        } else if let Some(sigs) = self.incomplete_endorsements.get(unit) {
            v_ids.into_iter().all(|v_id| sigs.contains_key(&v_id))
        } else {
            v_ids.into_iter().next().is_none()
        }
    }
/// Returns whether we have all endorsements for `unit`.
Returns whether we have all endorsements for `unit`.
Returns whether we have all endorsements for ` unit ` .
pub(crate) fn has_all_endorsements<I: IntoIterator<Item = ValidatorIndex>>(
        &self,
        unit: &C::Hash,
        v_ids: I,
    ) -> bool {
        if self.endorsements.contains_key(unit) {
            true // We have enough endorsements for this unit.
        } else if let Some(sigs) = self.incomplete_endorsements.get(unit) {
            v_ids.into_iter().all(|v_id| sigs.contains_key(&v_id))
        } else {
            v_ids.into_iter().next().is_none()
        }
    }
pub ( crate ) fn has_all_endorsements < I : IntoIterator < Item = ValidatorIndex > > ( & self , unit : & C :: Hash , v_ids : I , ) -> bool { if self . endorsements . contains_key ( unit ) { true // We have enough endorsements for this unit. } else if let Some ( sigs ) = self . incomplete_endorsements . get ( unit ) { v_ids . into_iter ( ) . all ( | v_id | sigs . contains_key ( & v_id ) ) } else { v_ids . into_iter ( ) . next ( ) . is_none ( ) } }
Returns whether we have all endorsements for `unit`.
Returns whether we have all endorsements for ` unit ` .
&self
unit
&C::Hash
v_ids
I
&self
unit
&C::Hash
v_ids
I