Collective pallet: max proposal weight (#13771)

* collective: max proposal weight

* fix test

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Muharem Ismailov
2023-04-19 13:00:27 +02:00
committed by GitHub
parent e458bf3795
commit f8b77f64f3
5 changed files with 66 additions and 2 deletions
+4
View File
@@ -210,6 +210,7 @@ parameter_types! {
})
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;
}
const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct());
@@ -1012,6 +1013,7 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
type SetMembersOrigin = EnsureRoot<Self::AccountId>;
type MaxProposalWeight = MaxCollectivesProposalWeight;
}
parameter_types! {
@@ -1072,6 +1074,7 @@ impl pallet_collective::Config<TechnicalCollective> for Runtime {
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
type SetMembersOrigin = EnsureRoot<Self::AccountId>;
type MaxProposalWeight = MaxCollectivesProposalWeight;
}
type EnsureRootOrHalfCouncil = EitherOfDiverse<
@@ -1700,6 +1703,7 @@ impl pallet_collective::Config<AllianceCollective> for Runtime {
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
type SetMembersOrigin = EnsureRoot<Self::AccountId>;
type MaxProposalWeight = MaxCollectivesProposalWeight;
}
parameter_types! {