pub fn check_proposal<B: Block + Clone>(
	authorities: &[AuthorityId],
	parent_hash: &B::Hash,
	propose: &rhododendron::LocalizedProposal<B, B::Hash, AuthorityId, LocalizedSignature>)
	-> Result<(), Error>
{
	if !authorities.contains(&propose.sender) {
		return Err(CommonErrorKind::InvalidAuthority(propose.sender.into()).into());
	}

	let action_header = Action::ProposeHeader(propose.round_number as u32, propose.digest.clone());
	let action_propose = Action::Propose(propose.round_number as u32, propose.proposal.clone());
	check_action::<B>(action_header, parent_hash, &propose.digest_signature)?;
	check_action::<B>(action_propose, parent_hash, &propose.full_signature)
}
/// Check proposal message signatures and authority.
/// Provide all valid authorities.
Check proposal message signatures and authority.
Provide all valid authorities.
Check proposal message signatures and authority . Provide all valid authorities .
pub fn check_proposal<B: Block + Clone>(
	authorities: &[AuthorityId],
	parent_hash: &B::Hash,
	propose: &rhododendron::LocalizedProposal<B, B::Hash, AuthorityId, LocalizedSignature>)
	-> Result<(), Error>
{
	if !authorities.contains(&propose.sender) {
		return Err(CommonErrorKind::InvalidAuthority(propose.sender.into()).into());
	}
	let action_header = Action::ProposeHeader(propose.round_number as u32, propose.digest.clone());
	let action_propose = Action::Propose(propose.round_number as u32, propose.proposal.clone());
	check_action::<B>(action_header, parent_hash, &propose.digest_signature)?;
	check_action::<B>(action_propose, parent_hash, &propose.full_signature)
}
pub fn check_proposal < B : Block + Clone > ( authorities : & [ AuthorityId ] , parent_hash : & B :: Hash , propose : & rhododendron :: LocalizedProposal < B , B :: Hash , AuthorityId , LocalizedSignature > ) -> Result < ( ) , Error > { if ! authorities . contains ( & propose . sender ) { return Err ( CommonErrorKind :: InvalidAuthority ( propose . sender . into ( ) ) . into ( ) ) ; } let action_header = Action :: ProposeHeader ( propose . round_number as u32 , propose . digest . clone ( ) ) ; let action_propose = Action :: Propose ( propose . round_number as u32 , propose . proposal . clone ( ) ) ; check_action :: < B > ( action_header , parent_hash , & propose . digest_signature ) ? ; check_action :: < B > ( action_propose , parent_hash , & propose . full_signature ) }
Check proposal message signatures and authority.
Check proposal message signatures and authority .
authorities
&[AuthorityId]
parent_hash
&B::Hash
propose
&rhododendron::LocalizedProposal<B, B::Hash, AuthorityId, LocalizedSignature>
authorities
&[AuthorityId]
parent_hash
&B::Hash
propose
&rhododendron::LocalizedProposal<B, B::Hash, AuthorityId, LocalizedSignature>