Companion for #11124 (#1316)

* Fixes

* Bump

* Formatting

* Bump

* Bump
This commit is contained in:
Gavin Wood
2022-05-31 18:50:02 +01:00
committed by GitHub
parent f157bf7adb
commit ba258329c8
5 changed files with 281 additions and 275 deletions
@@ -19,7 +19,7 @@ use super::{
};
use frame_support::{
match_types, parameter_types,
traits::{EnsureOneOf, Everything, Nothing},
traits::{EitherOfDiverse, Everything, Nothing},
weights::Weight,
};
use frame_system::EnsureRoot;
@@ -48,8 +48,10 @@ parameter_types! {
}
/// We allow root and the Relay Chain council to execute privileged collator selection operations.
pub type CollatorSelectionUpdateOrigin =
EnsureOneOf<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<RelayLocation, ExecutiveBody>>>;
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureXcm<IsMajorityOfBody<RelayLocation, ExecutiveBody>>,
>;
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
@@ -194,7 +196,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ChannelInfo = ParachainSystem;
type VersionWrapper = PolkadotXcm;
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
type ControllerOrigin = EnsureOneOf<
type ControllerOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureXcm<IsMajorityOfBody<RelayLocation, ExecutiveBody>>,
>;