[][src]Trait pallet_elections::Trait

Associated Types

type Event: From<Event<Self>> + Into<Self::Event>

type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber> + ReservableCurrency<Self::AccountId>

The currency that people are electing with.

type BadPresentation: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>

Handler for the unbalanced reduction when slashing a validator.

type BadReaper: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>

Handler for the unbalanced reduction when slashing an invalid reaping attempt.

type BadVoterIndex: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>

Handler for the unbalanced reduction when submitting a bad voter_index.

type LoserCandidate: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>

Handler for the unbalanced reduction when a candidate has lost (and is not a runner up)

type ChangeMembers: ChangeMembers<Self::AccountId>

What to do when the members change.

type CandidacyBond: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

How much should be locked up in order to submit one's candidacy. A reasonable default value is 9.

type VotingBond: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

How much should be locked up in order to be able to submit votes.

type VotingFee: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

The amount of fee paid upon each vote submission, unless if they submit a hole index and replace it.

type MinimumVotingLock: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

Minimum about that can be used as the locked value for voting.

type PresentSlashPerVoter: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

The punishment, per voter, if you provide an invalid presentation. A reasonable default value is 1.

type CarryCount: Get<u32>

How many runners-up should have their approvals persist until the next vote. A reasonable default value is 2.

type InactiveGracePeriod: Get<VoteIndex>

How many vote indices need to go by after a target voter's last vote before they can be reaped if their approvals are moot. A reasonable default value is 1.

type VotingPeriod: Get<Self::BlockNumber>

How often (in blocks) to check for new votes. A reasonable default value is 1000.

type DecayRatio: Get<u32>

Decay factor of weight when being accumulated. It should typically be set to at least membership_size -1 to keep the collective secure. When set to N, it indicates (1/N)^t of staked is decayed at weight increment step t. 0 will result in no weight being added at all (normal approval voting). A reasonable default value is 24.

Loading content...

Implementors

Loading content...