Function pallet_election_provider_multi_phase::helpers::stake_of_fn [−][src]
pub fn stake_of_fn<'a, T: Config>(
snapshot: &'a Vec<(T::AccountId, VoteWeight, Vec<T::AccountId>)>,
cache: &'a BTreeMap<T::AccountId, usize>
) -> impl Fn(&T::AccountId) -> VoteWeight + 'a
Expand description
Create a function to get the stake of a voter.
Warning
The cache need must be derived from the same snapshot. Zero is returned if a voter is non-existent.