referrerpolicy=no-referrer-when-downgrade
pub fn stake_of_fn<'a, T: MinerConfig>(
    snapshot: &'a Vec<MinerVoterOf<T>>,
    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.