Skip to content

Commit

Permalink
Merge pull request #3077 from autonomys/council-setmembers
Browse files Browse the repository at this point in the history
let council vote on setting new council members
  • Loading branch information
dariolina authored Oct 1, 2024
2 parents 865dd0d + bf5e921 commit 6b049cf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ parameter_types! {
pub MaxProposalWeight: Weight = Perbill::from_percent(50) * SubspaceBlockWeights::get().max_block;
}

pub type EnsureRootOr<O> = EitherOfDiverse<EnsureRoot<AccountId>, O>;
pub type AllCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 1>;
pub type TwoThirdsCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 2, 3>;
pub type HalfCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>;

// TODO: update params for mainnnet
impl pallet_collective::Config<CouncilCollective> for Runtime {
type DefaultVote = pallet_collective::PrimeDefaultVote;
Expand All @@ -452,7 +457,7 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type SetMembersOrigin = EnsureRoot<AccountId>;
type SetMembersOrigin = EnsureRootOr<AllCouncil>;
type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
}

Expand Down Expand Up @@ -495,12 +500,6 @@ impl pallet_scheduler::Config for Runtime {
type WeightInfo = pallet_scheduler::weights::SubstrateWeight<Runtime>;
}

// TODO: update params for mainnnet
pub type EnsureRootOr<O> = EitherOfDiverse<EnsureRoot<AccountId>, O>;
pub type AllCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 1>;
pub type TwoThirdsCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 2, 3>;
pub type HalfCouncil = EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>;

type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;

pub struct DemocracySlash;
Expand Down

0 comments on commit 6b049cf

Please sign in to comment.