pub(crate) fn decode_and_verify(
		encoded: Vec<u8>,
		set_id: u64,
		voters: &VoterSet<AuthorityId>,
	) -> Result<GrandpaJustification<Block>, ClientError> where
		NumberFor<Block>: grandpa::BlockNumberOps,
	{
		GrandpaJustification::<Block>::decode(&mut &*encoded).ok_or_else(|| {
			let msg = "failed to decode grandpa justification".to_string();
			ClientErrorKind::BadJustification(msg).into()
		}).and_then(|just| just.verify(set_id, voters).map(|_| just))
	}
/// Decode a GRANDPA justification and validate the commit and the votes'
/// ancestry proofs.
Decode a GRANDPA justification and validate the commit and the votes'
ancestry proofs.
Decode a GRANDPA justification and validate the commit and the votes ' ancestry proofs .
pub(crate) fn decode_and_verify(
		encoded: Vec<u8>,
		set_id: u64,
		voters: &VoterSet<AuthorityId>,
	) -> Result<GrandpaJustification<Block>, ClientError> where
		NumberFor<Block>: grandpa::BlockNumberOps,
	{
		GrandpaJustification::<Block>::decode(&mut &*encoded).ok_or_else(|| {
			let msg = "failed to decode grandpa justification".to_string();
			ClientErrorKind::BadJustification(msg).into()
		}).and_then(|just| just.verify(set_id, voters).map(|_| just))
	}
pub ( crate ) fn decode_and_verify ( encoded : Vec < u8 > , set_id : u64 , voters : & VoterSet < AuthorityId > , ) -> Result < GrandpaJustification < Block > , ClientError > where NumberFor < Block > : grandpa :: BlockNumberOps , { GrandpaJustification :: < Block > :: decode ( & mut & * encoded ) . ok_or_else ( | | { let msg = " " . to_string ( ) ; ClientErrorKind :: BadJustification ( msg ) . into ( ) } ) . and_then ( | just | just . verify ( set_id , voters ) . map ( | _ | just ) ) }
Decode a GRANDPA justification and validate the commit and the votes'
ancestry proofs.
Decode a GRANDPA justification and validate the commit and the votes ' ancestry proofs .
encoded
Vec<u8>
set_id
u64
voters
&VoterSet<AuthorityId>
encoded
Vec<u8>
set_id
u64
voters
&VoterSet<AuthorityId>