Function polkadot_primitives::v2::check_candidate_backing
source · pub fn check_candidate_backing<H: AsRef<[u8]> + Clone + Encode>(
backed: &BackedCandidate<H>,
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.