Function sp_npos_elections::pjr::pjr_check_core
source · pub fn pjr_check_core<AccountId: IdentifierT>(
candidates: &[CandidatePtr<AccountId>],
voters: &[Voter<AccountId>],
t: ExtendedBalance
) -> Result<(), AccountId>
Expand description
The internal implementation of the PJR check after having the data converted.
pjr_check
or t_pjr_check
are typically easier to work with.
This function returns an AccountId
in the Err
case. This is the counter_example: the ID of
the unelected candidate with the highest prescore, such that pre_score(counter_example) >= t
.