Expand description
Some helper functions/macros for this crate.
Functions§
- generate_
voter_ cache - Generate a btree-map cache of the voters and their indices.
- stake_
of_ fn - Create a function to get the stake of a voter.
- target_
at_ fn - Create a function that can map a target index (
SolutionTargetIndexOf
) to the actual target account using a linearly indexable snapshot. - target_
index_ fn - Create a function that returns the index of a target in the snapshot.
- voter_
at_ fn - Create a function that can map a voter index (
SolutionVoterIndexOf
) to the actual voter account using a linearly indexable snapshot. - voter_
index_ fn - Create a function that returns the index of a voter in the snapshot.
- voter_
index_ fn_ owned - Create a function that returns the index of a voter in the snapshot.
- voter_
index_ fn_ usize - Same as
voter_index_fn
, but the returning index is converted into usize, if possible.