Companion to #9514 (Remove Filter and use Contains instead) (#3591)

* Remove Filter and use Contains instead

* Fixes

* Remove patch

* Formatting

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Gavin Wood
2021-08-07 22:19:28 +02:00
committed by GitHub
parent a4527cbc49
commit 9800d22b1d
28 changed files with 226 additions and 232 deletions
+6 -6
View File
@@ -58,7 +58,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_support::{
construct_runtime, parameter_types,
traits::{All, Filter, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
traits::{Contains, Everything, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
weights::Weight,
PalletId, RuntimeDebug,
};
@@ -136,8 +136,8 @@ pub fn native_version() -> NativeVersion {
/// Allow everything.
pub struct BaseFilter;
impl Filter<Call> for BaseFilter {
fn filter(_: &Call) -> bool {
impl Contains<Call> for BaseFilter {
fn contains(_: &Call) -> bool {
true
}
}
@@ -917,7 +917,7 @@ pub type Barrier = (
// Weight that is paid for may be consumed.
TakeWeightCredit,
// If the message is one that immediately attemps to pay for execution, then allow it.
AllowTopLevelPaidExecutionFrom<All<MultiLocation>>,
AllowTopLevelPaidExecutionFrom<Everything>,
// Messages coming from system parachains need not pay for execution.
AllowUnpaidExecutionFrom<IsChildSystemParachain<ParaId>>,
);
@@ -953,8 +953,8 @@ impl pallet_xcm::Config for Runtime {
// ...but they must match our filter, which rejects everything.
type XcmExecuteFilter = ();
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = All<(MultiLocation, Vec<MultiAsset>)>;
type XcmReserveTransferFilter = All<(MultiLocation, Vec<MultiAsset>)>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type LocationInverter = LocationInverter<Ancestry>;
}