pub fn vote<T: Config>(
    votes: Vec<T::AccountId>,
    value: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
)
Expand description

Vote for a set of candidates for the upcoming round of election. This can be called to set the initial votes, or update already existing votes.

Upon initial voting, value units of who’s balance is locked and a deposit amount is reserved. The deposit is based on the number of votes and can be updated over time.

The votes should:

  • not be empty.
  • be less than the number of possible candidates. Note that all current members and runners-up are also automatically candidates for the next round.

If value is more than who’s free balance, then the maximum of the two is used.

The dispatch origin of this call must be signed.

Warning

It is the responsibility of the caller to NOT place all of their balance into the lock and keep some for further operations.

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::vote.