/// Return `true` if this node is a member of the notary group for the
/// current round (given the previous beacon). Return `false` if not or we
/// failed to determine the committee for this round.
Return `true` if this node is a member of the notary group for the
current round (given the previous beacon). Return `false` if not or we
failed to determine the committee for this round.
Return ` true ` if this node is a member of the notary group for the current round ( given the previous beacon ) . Return ` false ` if not or we failed to determine the committee for this round .
fn is_notary(&self, pool: &PoolReader<'_>, previous_beacon: &RandomBeacon) -> bool {
        match self.membership.node_belongs_to_notarization_committee(
            previous_beacon.height().increment(),
            previous_beacon,
            self.replica_config.node_id,
        ) {
            Ok(value) => value,
            Err(MembershipError::UnableToRetrieveDkgSummary(h)) => {
                error!(
                    self.log,
                    "Couldn't find transcript at height {} with finalized height {} and CUP height {}",
                    h,
                    pool.get_finalized_height(),
                    pool.get_catch_up_height()
                );
                false
            }
            Err(err) => {
                warn!(self.log, "Membership error: {:?}", err);
                false
            }
        }
    }
fn is_notary ( & self , pool : & PoolReader < ' _ > , previous_beacon : & RandomBeacon ) -> bool { match self . membership . node_belongs_to_notarization_committee ( previous_beacon . height ( ) . increment ( ) , previous_beacon , self . replica_config . node_id , ) { Ok ( value ) => value , Err ( MembershipError :: UnableToRetrieveDkgSummary ( h ) ) => { error ! ( self log " " h pool get_finalized_height ( ) pool get_catch_up_height ( ) ) ; false } Err ( err ) => { warn ! ( self log " " err ) ; false } } }
Return `true` if this node is a member of the notary group for the
current round (given the previous beacon).
Return ` true ` if this node is a member of the notary group for the current round ( given the previous beacon ) .
&self
pool
&PoolReader<'_>
previous_beacon
&RandomBeacon