fn aggregate_random_tape_shares(&self, pool: &PoolReader<'_>) -> Vec<ConsensusMessage> {
        let expected_height = self.message_routing.expected_batch_height();
        let finalized_height = pool.get_finalized_height();
        let max_height = min(
            expected_height + Height::from(RANDOM_TAPE_CHECK_MAX_HEIGHT_RANGE),
            finalized_height.increment(),
        );
        // Filter out those at a height where we have a full tape already.
        let shares = pool
            .get_random_tape_shares(expected_height, max_height)
            .filter(|share| pool.get_random_tape(share.height()).is_none());
        let state_reader = pool.as_cache();
        to_messages(utils::aggregate(
            &self.log,
            self.membership.as_ref(),
            self.crypto.as_aggregate(),
            Box::new(|content: &RandomTapeContent| {
                utils::active_low_threshold_transcript(state_reader, content.height())
                    .map(|transcript| transcript.dkg_id)
            }),
            shares,
        ))
    }
/// Attempt to construct random tapes for rounds greater than or equal to
/// expected_batch_height.
Attempt to construct random tapes for rounds greater than or equal to
expected_batch_height.
Attempt to construct random tapes for rounds greater than or equal to expected_batch_height .
fn aggregate_random_tape_shares(&self, pool: &PoolReader<'_>) -> Vec<ConsensusMessage> {
        let expected_height = self.message_routing.expected_batch_height();
        let finalized_height = pool.get_finalized_height();
        let max_height = min(
            expected_height + Height::from(RANDOM_TAPE_CHECK_MAX_HEIGHT_RANGE),
            finalized_height.increment(),
        );
        // Filter out those at a height where we have a full tape already.
        let shares = pool
            .get_random_tape_shares(expected_height, max_height)
            .filter(|share| pool.get_random_tape(share.height()).is_none());
        let state_reader = pool.as_cache();
        to_messages(utils::aggregate(
            &self.log,
            self.membership.as_ref(),
            self.crypto.as_aggregate(),
            Box::new(|content: &RandomTapeContent| {
                utils::active_low_threshold_transcript(state_reader, content.height())
                    .map(|transcript| transcript.dkg_id)
            }),
            shares,
        ))
    }
fn aggregate_random_tape_shares ( & self , pool : & PoolReader < ' _ > ) -> Vec < ConsensusMessage > { let expected_height = self . message_routing . expected_batch_height ( ) ; let finalized_height = pool . get_finalized_height ( ) ; let max_height = min ( expected_height + Height :: from ( RANDOM_TAPE_CHECK_MAX_HEIGHT_RANGE ) , finalized_height . increment ( ) , ) ; // Filter out those at a height where we have a full tape already. let shares = pool . get_random_tape_shares ( expected_height , max_height ) . filter ( | share | pool . get_random_tape ( share . height ( ) ) . is_none ( ) ) ; let state_reader = pool . as_cache ( ) ; to_messages ( utils :: aggregate ( & self . log , self . membership . as_ref ( ) , self . crypto . as_aggregate ( ) , Box :: new ( | content : & RandomTapeContent | { utils :: active_low_threshold_transcript ( state_reader , content . height ( ) ) . map ( | transcript | transcript . dkg_id ) } ) , shares , ) ) }
Attempt to construct random tapes for rounds greater than or equal to
expected_batch_height.
Attempt to construct random tapes for rounds greater than or equal to expected_batch_height .
&self
pool
&PoolReader<'_>
&self
pool
&PoolReader<'_>