pub fn node_belongs_to_notarization_committee(
        &self,
        height: Height,
        previous_beacon: &RandomBeacon,
        node_id: NodeId,
    ) -> Result<bool, MembershipError> {
        let shuffled_nodes = self.get_shuffled_nodes(
            height,
            previous_beacon,
            &RandomnessPurpose::CommitteeSampling,
        )?;
        Ok(match shuffled_nodes.iter().position(|id| *id == node_id) {
            Some(i) => i < get_committee_size(shuffled_nodes.len()),
            None => false,
        })
    }
/// Return true if the given node ID is part of the notarization committee
/// at the given height
Return true if the given node ID is part of the notarization committee
at the given height
Return true if the given node ID is part of the notarization committee at the given height
pub fn node_belongs_to_notarization_committee(
        &self,
        height: Height,
        previous_beacon: &RandomBeacon,
        node_id: NodeId,
    ) -> Result<bool, MembershipError> {
        let shuffled_nodes = self.get_shuffled_nodes(
            height,
            previous_beacon,
            &RandomnessPurpose::CommitteeSampling,
        )?;
        Ok(match shuffled_nodes.iter().position(|id| *id == node_id) {
            Some(i) => i < get_committee_size(shuffled_nodes.len()),
            None => false,
        })
    }
pub fn node_belongs_to_notarization_committee ( & self , height : Height , previous_beacon : & RandomBeacon , node_id : NodeId , ) -> Result < bool , MembershipError > { let shuffled_nodes = self . get_shuffled_nodes ( height , previous_beacon , & RandomnessPurpose :: CommitteeSampling , ) ? ; Ok ( match shuffled_nodes . iter ( ) . position ( | id | * id == node_id ) { Some ( i ) => i < get_committee_size ( shuffled_nodes . len ( ) ) , None => false , } ) }
Return true if the given node ID is part of the notarization committee
at the given height
Return true if the given node ID is part of the notarization committee at the given height
&self
height
Height
previous_beacon
&RandomBeacon
node_id
NodeId
&self
height
Height
previous_beacon
&RandomBeacon
node_id
NodeId