Function pallet_conviction_voting::pallet::dispatchables::remove_vote
source · pub fn remove_vote<T: Config<I>, I: 'static>(
class: Option<<<T as Config<I>>::Polls as Polling<TallyOf<T, I>>>::Class>,
index: <<T as Config<I>>::Polls as Polling<TallyOf<T, I>>>::Index
)
Expand description
Remove a vote for a poll.
If:
- the poll was cancelled, or
- the poll is ongoing, or
- the poll has ended such that
- the vote of the account was in opposition to the result; or
- there was no conviction to the account’s vote; or
- the account made a split vote
…then the vote is removed cleanly and a following call to
unlock
may result in more funds being available.
If, however, the poll has ended and:
- it finished corresponding to the vote of the account, and
- the account made a standard vote with conviction, and
- the lock period of the conviction is not over …then the lock will be aggregated into the overall account’s lock, which may involve overlocking (where the two locks are combined into a single lock that is the maximum of both the amount locked and the time is it locked for).
The dispatch origin of this call must be Signed, and the signer must have a vote
registered for poll index
.
index
: The index of poll of the vote to be removed.class
: Optional parameter, if given it indicates the class of the poll. For polls which have finished or are cancelled, this must beSome
.
Weight: O(R + log R)
where R is the number of polls that target
has voted on.
Weight is calculated for the maximum number of vote.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::remove_vote
.