Function polkadot_primitives::v8::check_candidate_backing
source ยท pub fn check_candidate_backing<H: AsRef<[u8]> + Clone + Encode + Debug>(
candidate_hash: CandidateHash,
validity_votes: &[ValidityAttestation],
validator_indices: &BitSlice<u8, Lsb0>,
signing_context: &SigningContext<H>,
group_len: usize,
validator_lookup: impl Fn(usize) -> Option<ValidatorId>,
) -> Result<usize, ()>
Expand description
Verify the backing of the given candidate.
Provide a lookup from the index of a validator within the group assigned to this para, as opposed to the index of the validator within the overall validator set, as well as the number of validators in the group.
Also provide the signing context.
Returns either an error, indicating that one of the signatures was invalid or that the index was out-of-bounds, or the number of signatures checked.