/// Notarize and return a `NotarizationShare` for the given block
Notarize and return a `NotarizationShare` for the given block
Notarize and return a ` NotarizationShare ` for the given block
fn notarize_block<'a>(
        &self,
        pool: &PoolReader<'_>,
        block: &'a Block,
    ) -> Option<NotarizationShare> {
        let registry_version = pool.registry_version(block.height)?;
        let content = NotarizationContent::new(block.height, ic_crypto::crypto_hash(block));
        match self
            .crypto
            .sign(&content, self.replica_config.node_id, registry_version)
        {
            Ok(signature) => Some(NotarizationShare { content, signature }),
            Err(err) => {
                error!(self.log, "Couldn't create a signature: {:?}", err);
                None
            }
        }
    }
fn notarize_block < ' a > ( & self , pool : & PoolReader < ' _ > , block : & ' a Block , ) -> Option < NotarizationShare > { let registry_version = pool . registry_version ( block . height ) ? ; let content = NotarizationContent :: new ( block . height , ic_crypto :: crypto_hash ( block ) ) ; match self . crypto . sign ( & content , self . replica_config . node_id , registry_version ) { Ok ( signature ) => Some ( NotarizationShare { content , signature } ) , Err ( err ) => { error ! ( self log " " err ) ; None } } }
Notarize and return a `NotarizationShare` for the given block
Notarize and return a ` NotarizationShare ` for the given block
&self
pool
&PoolReader<'_>
block
&'a Block