mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Companion PR: add weightinfo for collective (#1524)
* add and use generated weights for collective pallet * correct pallet name * MaxMembers * add weight to technical collective * Fix const assert * update weights * update import * "Update Substrate" * bump spec_version Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -87,7 +87,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("kusama"),
|
||||
impl_name: create_runtime_str!("parity-kusama"),
|
||||
authoring_version: 2,
|
||||
spec_version: 2023,
|
||||
spec_version: 2024,
|
||||
impl_version: 0,
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
@@ -407,6 +407,7 @@ impl pallet_democracy::Trait for Runtime {
|
||||
parameter_types! {
|
||||
pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
|
||||
pub const CouncilMaxProposals: u32 = 100;
|
||||
pub const CouncilMaxMembers: u32 = 100;
|
||||
}
|
||||
|
||||
type CouncilCollective = pallet_collective::Instance1;
|
||||
@@ -416,7 +417,8 @@ impl pallet_collective::Trait<CouncilCollective> for Runtime {
|
||||
type Event = Event;
|
||||
type MotionDuration = CouncilMotionDuration;
|
||||
type MaxProposals = CouncilMaxProposals;
|
||||
type WeightInfo = ();
|
||||
type MaxMembers = CouncilMaxMembers;
|
||||
type WeightInfo = weights::pallet_collective::WeightInfo;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -428,8 +430,8 @@ parameter_types! {
|
||||
pub const DesiredRunnersUp: u32 = 19;
|
||||
pub const ElectionsPhragmenModuleId: LockIdentifier = *b"phrelect";
|
||||
}
|
||||
// Make sure that there are no more than MAX_MEMBERS members elected via phragmen.
|
||||
const_assert!(DesiredMembers::get() <= pallet_collective::MAX_MEMBERS);
|
||||
// Make sure that there are no more than MaxMembers members elected via phragmen.
|
||||
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
|
||||
|
||||
impl pallet_elections_phragmen::Trait for Runtime {
|
||||
type Event = Event;
|
||||
@@ -452,6 +454,7 @@ impl pallet_elections_phragmen::Trait for Runtime {
|
||||
parameter_types! {
|
||||
pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
|
||||
pub const TechnicalMaxProposals: u32 = 100;
|
||||
pub const TechnicalMaxMembers: u32 = 100;
|
||||
}
|
||||
|
||||
type TechnicalCollective = pallet_collective::Instance2;
|
||||
@@ -461,7 +464,8 @@ impl pallet_collective::Trait<TechnicalCollective> for Runtime {
|
||||
type Event = Event;
|
||||
type MotionDuration = TechnicalMotionDuration;
|
||||
type MaxProposals = TechnicalMaxProposals;
|
||||
type WeightInfo = ();
|
||||
type MaxMembers = TechnicalMaxMembers;
|
||||
type WeightInfo = weights::pallet_collective::WeightInfo;
|
||||
}
|
||||
|
||||
impl pallet_membership::Trait<pallet_membership::Instance1> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user