Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
gavofyork committed Sep 17, 2020
commit a946fac750ba1d752fb5c45410cb3b5af0260f3e
14 changes: 13 additions & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,19 @@ impl pallet_democracy::Trait for Runtime {
type InstantAllowed = InstantAllowed;
type FastTrackVotingPeriod = FastTrackVotingPeriod;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type CancellationOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>;
type CancellationOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
>;
// To cancel a proposal before it has been passed, the technical committee must be unanimous or
// Root must agree.
type CancelProposalOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
>;
type BlacklistOrigin = EnsureRoot<AccountId>;
// Any single technical committee member may veto a coming council proposal, however they can
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
Expand Down
12 changes: 11 additions & 1 deletion runtime/kusama/src/weights/pallet_democracy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};

pub struct WeightInfo;
impl pallet_democracy::WeightInfo for WeightInfo {
fn propose() -> Weight {
fn propose(_p: u32, ) -> Weight {
(49113000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(3 as Weight))
Expand Down Expand Up @@ -49,6 +49,16 @@ impl pallet_democracy::WeightInfo for WeightInfo {
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn blacklist() -> Weight {
(31071000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_proposal() -> Weight {
(31071000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn external_propose(v: u32, ) -> Weight {
(14282000 as Weight)
.saturating_add((109000 as Weight).saturating_mul(v as Weight))
Expand Down
11 changes: 9 additions & 2 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,17 @@ impl pallet_democracy::Trait for Runtime {
type InstantAllowed = InstantAllowed;
type FastTrackVotingPeriod = FastTrackVotingPeriod;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type CancellationOrigin = frame_system::EnsureOneOf<AccountId,
type CancellationOrigin = EnsureOneOf<AccountId,
pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>,
frame_system::EnsureRoot<AccountId>,
EnsureRoot<AccountId>,
>;
// To cancel a proposal before it has been passed, the technical committee must be unanimous or
// Root must agree.
type CancelProposalOrigin = EnsureOneOf<AccountId,
pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
EnsureRoot<AccountId>,
>;
type BlacklistOrigin = EnsureRoot<AccountId>;
// Any single technical committee member may veto a coming council proposal, however they can
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
Expand Down
12 changes: 11 additions & 1 deletion runtime/polkadot/src/weights/pallet_democracy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};

pub struct WeightInfo;
impl pallet_democracy::WeightInfo for WeightInfo {
fn propose() -> Weight {
fn propose(_p: u32, ) -> Weight {
(49113000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(3 as Weight))
Expand Down Expand Up @@ -49,6 +49,16 @@ impl pallet_democracy::WeightInfo for WeightInfo {
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn blacklist() -> Weight {
(31071000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn cancel_proposal() -> Weight {
(31071000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
}
fn external_propose(v: u32, ) -> Weight {
(14282000 as Weight)
.saturating_add((109000 as Weight).saturating_mul(v as Weight))
Expand Down