pub fn voter_index_fn<T: MinerConfig>( cache: &BTreeMap<T::AccountId, usize> ) -> impl Fn(&T::AccountId) -> Option<SolutionVoterIndexOf<T>> + '_
Create a function that returns the index of a voter in the snapshot.
The returning index type is the same as the one defined in
Note that this will represent the snapshot data from which the
cache is generated.