Function sp_npos_elections::setup_inputs[][src]

pub fn setup_inputs<AccountId: IdentifierT>(
    initial_candidates: Vec<AccountId>,
    initial_voters: Vec<(AccountId, VoteWeight, Vec<AccountId>)>
) -> (Vec<CandidatePtr<AccountId>>, Vec<Voter<AccountId>>)
Expand description

Converts raw inputs to types used in this crate.

This will perform some cleanup that are most often important:

  • It drops any votes that are pointing to non-candidates.
  • It drops duplicate targets within a voter.