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:
Gavin Wood
2022-06-01 10:23:47 +01:00
committed by GitHub
parent 8e9639d2ff
commit 5595f10245
22 changed files with 1641 additions and 17 deletions
+4 -1
View File
@@ -491,7 +491,10 @@ impl frame_support::traits::OriginTrait for Origin {
fn root() -> Self {
unimplemented!("Not required in tests!")
}
fn signed(_by: <Runtime as frame_system::Config>::AccountId) -> Self {
fn signed(_by: Self::AccountId) -> Self {
unimplemented!("Not required in tests!")
}
fn as_signed(self) -> Option<Self::AccountId> {
unimplemented!("Not required in tests!")
}
}