/// Validate a single `Signed`, `NotaryIssued` value. This involves checking
/// that the associated block and beacon both exist and that the signer(s)
/// is(are) in the notary group. The details of signature verification
/// including any calls to crypto happen within the `SignatureVerify`
/// interface. Note that whether the ancestor block of the given block is
/// notarized is checked while validating the corresponding BlockProposal in
/// check_block_validity.
Validate a single `Signed`, `NotaryIssued` value. This involves checking
that the associated block and beacon both exist and that the signer(s)
is(are) in the notary group. The details of signature verification
including any calls to crypto happen within the `SignatureVerify`
interface. Note that whether the ancestor block of the given block is
notarized is checked while validating the corresponding BlockProposal in
check_block_validity.
Validate a single ` Signed ` ` NotaryIssued ` value . This involves checking that the associated block and beacon both exist and that the signer ( s ) is ( are ) in the notary group . The details of signature verification including any calls to crypto happen within the ` SignatureVerify ` interface . Note that whether the ancestor block of the given block is notarized is checked while validating the corresponding BlockProposal in check_block_validity .
fn validate_notary_issued<T, S>(
        &self,
        pool_reader: &PoolReader<'_>,
        notary_issued: Signed<T, S>,
    ) -> Option<ChangeAction>
    where
        Signed<T, S>: SignatureVerify + ConsensusMessageHashable + Clone,
        T: NotaryIssued,
    {
        // This is checked before entering this function.
        debug_assert!(notary_issued.height() > pool_reader.get_finalized_height());
        if notary_issued.content.is_duplicate(pool_reader) {
            return Some(ChangeAction::RemoveFromUnvalidated(
                notary_issued.into_message(),
            ));
        }
        match notary_issued.content.dependencies_validated(pool_reader) {
            Ok(()) => {
                let verification = self.verify_signature(pool_reader, &notary_issued);
                self.compute_action_from_sig_verification(
                    pool_reader,
                    verification,
                    notary_issued.into_message(),
                )
            }
            Err(err) => {
                if self.unvalidated_for_too_long(pool_reader, &notary_issued.get_id()) {
                    warn!(every_n_seconds => LOG_EVERY_N_SECONDS,
                          self.log,
                          "{} {:?}", err, notary_issued.content
                    );
                }
                None
            }
        }
    }
fn validate_notary_issued < T , S > ( & self , pool_reader : & PoolReader < ' _ > , notary_issued : Signed < T , S > , ) -> Option < ChangeAction > where Signed < T , S > : SignatureVerify + ConsensusMessageHashable + Clone , T : NotaryIssued , { // This is checked before entering this function. debug_assert ! ( notary_issued height ( ) pool_reader get_finalized_height ( ) ) ; if notary_issued . content . is_duplicate ( pool_reader ) { return Some ( ChangeAction :: RemoveFromUnvalidated ( notary_issued . into_message ( ) , ) ) ; } match notary_issued . content . dependencies_validated ( pool_reader ) { Ok ( ( ) ) => { let verification = self . verify_signature ( pool_reader , & notary_issued ) ; self . compute_action_from_sig_verification ( pool_reader , verification , notary_issued . into_message ( ) , ) } Err ( err ) => { if self . unvalidated_for_too_long ( pool_reader , & notary_issued . get_id ( ) ) { warn ! ( every_n_seconds LOG_EVERY_N_SECONDS self log " " err notary_issued content ) ; } None } } }
Validate a single `Signed`, `NotaryIssued` value.
Validate a single ` Signed ` ` NotaryIssued ` value .
&self
pool_reader
&PoolReader<'_>
notary_issued
Signed<T, S>