mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 06:17:56 +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:
@@ -19,7 +19,7 @@
|
||||
//! votes.
|
||||
|
||||
use crate::dispatch::{DispatchError, Parameter};
|
||||
use codec::HasCompact;
|
||||
use codec::{HasCompact, MaxEncodedLen};
|
||||
use sp_arithmetic::{
|
||||
traits::{SaturatedConversion, UniqueSaturatedFrom, UniqueSaturatedInto},
|
||||
Perbill,
|
||||
@@ -123,9 +123,9 @@ impl<Tally, Moment, Class> PollStatus<Tally, Moment, Class> {
|
||||
}
|
||||
|
||||
pub trait Polling<Tally> {
|
||||
type Index: Parameter + Member + Ord + PartialOrd + Copy + HasCompact;
|
||||
type Votes: Parameter + Member + Ord + PartialOrd + Copy + HasCompact;
|
||||
type Class: Parameter + Member + Ord + PartialOrd;
|
||||
type Index: Parameter + Member + Ord + PartialOrd + Copy + HasCompact + MaxEncodedLen;
|
||||
type Votes: Parameter + Member + Ord + PartialOrd + Copy + HasCompact + MaxEncodedLen;
|
||||
type Class: Parameter + Member + Ord + PartialOrd + MaxEncodedLen;
|
||||
type Moment;
|
||||
|
||||
/// Provides a vec of values that `T` may take.
|
||||
|
||||
Reference in New Issue
Block a user