fn create_random_tape_share(
        &self,
        height: Height,
        pool: &PoolReader<'_>,
    ) -> Option<RandomTapeShare> {
        let content = RandomTapeContent::new(height);

        if let Some(transcript) = active_low_threshold_transcript(pool.as_cache(), height) {
            match self
                .crypto
                .sign(&content, self.replica_config.node_id, transcript.dkg_id)
            {
                Ok(signature) => Some(RandomTapeShare { content, signature }),
                Err(err) => {
                    error!(self.log, "Couldn't create a signature: {:?}", err);
                    None
                }
            }
        } else {
            error!(
                self.log,
                "Couldn't find the transcript at height {}", height
            );
            None
        }
    }
/// Construct a RandomTapeShare for the given height
Construct a RandomTapeShare for the given height
Construct a RandomTapeShare for the given height
fn create_random_tape_share(
        &self,
        height: Height,
        pool: &PoolReader<'_>,
    ) -> Option<RandomTapeShare> {
        let content = RandomTapeContent::new(height);
        if let Some(transcript) = active_low_threshold_transcript(pool.as_cache(), height) {
            match self
                .crypto
                .sign(&content, self.replica_config.node_id, transcript.dkg_id)
            {
                Ok(signature) => Some(RandomTapeShare { content, signature }),
                Err(err) => {
                    error!(self.log, "Couldn't create a signature: {:?}", err);
                    None
                }
            }
        } else {
            error!(
                self.log,
                "Couldn't find the transcript at height {}", height
            );
            None
        }
    }
fn create_random_tape_share ( & self , height : Height , pool : & PoolReader < ' _ > , ) -> Option < RandomTapeShare > { let content = RandomTapeContent :: new ( height ) ; if let Some ( transcript ) = active_low_threshold_transcript ( pool . as_cache ( ) , height ) { match self . crypto . sign ( & content , self . replica_config . node_id , transcript . dkg_id ) { Ok ( signature ) => Some ( RandomTapeShare { content , signature } ) , Err ( err ) => { error ! ( self log " " err ) ; None } } } else { error ! ( self log " " height ) ; None } }
Construct a RandomTapeShare for the given height
Construct a RandomTapeShare for the given height
&self
height
Height
pool
&PoolReader<'_>
&self
height
Height
pool
&PoolReader<'_>