pub fn verify_aggregated_signature(
        &self,
        hash: HashValue,
        aggregated_signature: &BTreeMap<AccountAddress, Ed25519Signature>,
    ) -> std::result::Result<(), VerifyError> {
        self.check_num_of_signatures(aggregated_signature)?;
        self.check_voting_power(aggregated_signature.keys())?;
        for (author, signature) in aggregated_signature {
            self.verify_signature(*author, hash, &signature.clone())?;
        }
        Ok(())
    }
/// This function will successfully return when at least quorum_size signatures of known authors
/// are successfully verified. Also, an aggregated signature is considered invalid if any of the
/// attached signatures is invalid or it does not correspond to a known author. The latter is to
/// prevent malicious users from adding arbitrary content to the signature payload that would go
/// unnoticed.
This function will successfully return when at least quorum_size signatures of known authors
are successfully verified. Also, an aggregated signature is considered invalid if any of the
attached signatures is invalid or it does not correspond to a known author. The latter is to
prevent malicious users from adding arbitrary content to the signature payload that would go
unnoticed.
This function will successfully return when at least quorum_size signatures of known authors are successfully verified . Also an aggregated signature is considered invalid if any of the attached signatures is invalid or it does not correspond to a known author . The latter is to prevent malicious users from adding arbitrary content to the signature payload that would go unnoticed .
pub fn verify_aggregated_signature(
        &self,
        hash: HashValue,
        aggregated_signature: &BTreeMap<AccountAddress, Ed25519Signature>,
    ) -> std::result::Result<(), VerifyError> {
        self.check_num_of_signatures(aggregated_signature)?;
        self.check_voting_power(aggregated_signature.keys())?;
        for (author, signature) in aggregated_signature {
            self.verify_signature(*author, hash, &signature.clone())?;
        }
        Ok(())
    }
pub fn verify_aggregated_signature ( & self , hash : HashValue , aggregated_signature : & BTreeMap < AccountAddress , Ed25519Signature > , ) -> std :: result :: Result < ( ) , VerifyError > { self . check_num_of_signatures ( aggregated_signature ) ? ; self . check_voting_power ( aggregated_signature . keys ( ) ) ? ; for ( author , signature ) in aggregated_signature { self . verify_signature ( * author , hash , & signature . clone ( ) ) ? ; } Ok ( ( ) ) }
This function will successfully return when at least quorum_size signatures of known authors
are successfully verified.
This function will successfully return when at least quorum_size signatures of known authors are successfully verified .
&self
hash
HashValue
aggregated_signature
&BTreeMap<AccountAddress, Ed25519Signature>
&self
hash
HashValue
aggregated_signature
&BTreeMap<AccountAddress, Ed25519Signature>