difftreelog
fix techcomm prime can be set by council
in: master
1 file changed
runtime/common/config/governance/technical_committee.rsdiffbeforeafterboth1use super::*;23parameter_types! {4 pub TechnicalMaxProposals: u32 = 100;5 pub TechnicalMaxMembers: u32 = 100;6}78#[cfg(not(feature = "gov-test-timings"))]9use crate::governance_timings::technical_committee as technical_committee_timings;1011#[cfg(feature = "gov-test-timings")]12pub mod technical_committee_timings {13 use super::*;1415 parameter_types! {16 pub TechnicalMotionDuration: BlockNumber = 35;17 }18}1920pub type TechnicalCollective = pallet_collective::Instance2;21impl pallet_collective::Config<TechnicalCollective> for Runtime {22 type RuntimeOrigin = RuntimeOrigin;23 type Proposal = RuntimeCall;24 type RuntimeEvent = RuntimeEvent;25 type MotionDuration = technical_committee_timings::TechnicalMotionDuration;26 type MaxProposals = TechnicalMaxProposals;27 type MaxMembers = TechnicalMaxMembers;28 type DefaultVote = pallet_collective::PrimeDefaultVote;29 type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;30 type SetMembersOrigin = EnsureRoot<AccountId>;31 type MaxProposalWeight = MaxCollectivesProposalWeight;32}3334pub type TechnicalCollectiveMembership = pallet_membership::Instance2;35impl pallet_membership::Config<TechnicalCollectiveMembership> for Runtime {36 type RuntimeEvent = RuntimeEvent;37 type AddOrigin = RootOrMoreThanHalfCouncil;38 type RemoveOrigin = RootOrMoreThanHalfCouncil;39 type SwapOrigin = RootOrMoreThanHalfCouncil;40 type ResetOrigin = EnsureRoot<AccountId>;41 type PrimeOrigin = EnsureRoot<AccountId>;42 type MembershipInitialized = TechnicalCommittee;43 type MembershipChanged = TechnicalCommittee;44 type MaxMembers = TechnicalMaxMembers;45 type WeightInfo = pallet_membership::weights::SubstrateWeight<Runtime>;46}4748pub type TechnicalCommitteeMember = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;4950pub type RootOrTechnicalCommitteeMember =51 EitherOfDiverse<EnsureRoot<AccountId>, TechnicalCommitteeMember>;5253pub type AllTechnicalCommittee =54 pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCollective, 1, 1>;5556pub type RootOrAllTechnicalCommittee =57 EitherOfDiverse<EnsureRoot<AccountId>, AllTechnicalCommittee>;