mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
Ranked Collective pallet (#11548)
* Ranked Collective pallet * Fixes * benchmarks * Weights * Allow class voting in rank Use bare ayes for calculating support. Allow only promotion/demotion by one rank only. Allow removal of member with rank zero only. Use new Tally API * Index by rank, still O(1). * Custom vote weights * Formatting * Update frame/ranked-collective/src/lib.rs * Broken :( * origin guard; cleanup uses new API * Formatting * Promote/demote by rank * Formatting * Use new API * Remove code in another PR * Remove code in another PR * Formatting * Remove code in another PR * Docs * Docs * Bump * Fixes * Formatting * Fixes
This commit is contained in:
@@ -150,7 +150,7 @@ pub mod pallet {
|
||||
/// Handler for the unbalanced reduction when slashing a preimage deposit.
|
||||
type Slash: OnUnbalanced<NegativeImbalanceOf<Self, I>>;
|
||||
/// The counting type for votes. Usually just balance.
|
||||
type Votes: AtLeast32BitUnsigned + Copy + Parameter + Member;
|
||||
type Votes: AtLeast32BitUnsigned + Copy + Parameter + Member + MaxEncodedLen;
|
||||
/// The tallying type.
|
||||
type Tally: VoteTally<Self::Votes, TrackIdOf<Self, I>>
|
||||
+ Clone
|
||||
|
||||
@@ -136,7 +136,7 @@ pub struct TrackInfo<Balance, Moment> {
|
||||
/// Information on the voting tracks.
|
||||
pub trait TracksInfo<Balance, Moment> {
|
||||
/// The identifier for a track.
|
||||
type Id: Copy + Parameter + Ord + PartialOrd + Send + Sync + 'static;
|
||||
type Id: Copy + Parameter + Ord + PartialOrd + Send + Sync + 'static + MaxEncodedLen;
|
||||
|
||||
/// The origin type from which a track is implied.
|
||||
type Origin;
|
||||
|
||||
Reference in New Issue
Block a user