Trait frame_election_provider_support::VoteWeightProvider[][src]

pub trait VoteWeightProvider<AccountId> {
    fn vote_weight(who: &AccountId) -> VoteWeight;

    fn set_vote_weight_of(_: &AccountId, _: VoteWeight) { ... }
Expand description

Something that can provide the VoteWeight of an account. Similar to ElectionProvider and ElectionDataProvider, this should typically be implementing by whoever is supposed to use SortedListProvider.

Required methods

Get the current VoteWeight of who.

Provided methods

For tests and benchmarks, set the VoteWeight.