Function pallet_election_provider_multi_phase::helpers::generate_voter_cache[][src]

pub fn generate_voter_cache<T: Config>(
    snapshot: &Vec<(T::AccountId, VoteWeight, Vec<T::AccountId>)>
) -> BTreeMap<T::AccountId, usize>
Expand description

Generate a btree-map cache of the voters and their indices.

This can be used to efficiently build index getter closures.