Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.
Closed
Prev Previous commit
Next Next commit
add generated weight info for pallet-collective. companion for #6789
  • Loading branch information
wuminzhe committed Oct 12, 2020
commit dcc39046e52294942a853949309befdecbab96cc
10 changes: 8 additions & 2 deletions bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,18 +761,22 @@ impl darwinia_democracy::Trait for Runtime {
parameter_types! {
pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
pub const CouncilMaxProposals: u32 = 100;
pub const CouncilMaxMembers: u32 = 100;
pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
pub const TechnicalMaxProposals: u32 = 100;
pub const TechnicalMaxMembers: u32 = 100;
}
// Make sure that there are no more than `MAX_MEMBERS` members elected via elections-phragmen.
const_assert!(DesiredMembers::get() <= pallet_collective::MAX_MEMBERS);
// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen.
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
type CouncilCollective = pallet_collective::Instance0;
impl pallet_collective::Trait<CouncilCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
type MotionDuration = CouncilMotionDuration;
type MaxProposals = CouncilMaxProposals;
type MaxMembers = CouncilMaxMembers;
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = ();
}
type TechnicalCollective = pallet_collective::Instance1;
Expand All @@ -782,6 +786,8 @@ impl pallet_collective::Trait<TechnicalCollective> for Runtime {
type Event = Event;
type MotionDuration = TechnicalMotionDuration;
type MaxProposals = TechnicalMaxProposals;
type MaxMembers = TechnicalMaxMembers;
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = ();
}

Expand Down