Replace () filter with Nothing (#3665)

* replace `()` filter with `Nothing`

* import nothing

* add nothing

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2021-08-19 20:32:00 +02:00
committed by GitHub
parent d6abe70c06
commit 4d4562f59a
7 changed files with 179 additions and 165 deletions
@@ -19,7 +19,7 @@
use codec::{Decode, Encode};
use frame_support::{
construct_runtime, parameter_types,
traits::Everything,
traits::{Everything, Nothing},
weights::{constants::WEIGHT_PER_SECOND, Weight},
};
use sp_core::H256;
@@ -296,7 +296,7 @@ impl pallet_xcm::Config for Runtime {
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = ();
type XcmTeleportFilter = Nothing;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<UnitWeightCost, Call>;
type LocationInverter = LocationInverter<Ancestry>;
@@ -16,7 +16,11 @@
//! Relay chain runtime mock.
use frame_support::{construct_runtime, parameter_types, traits::Everything, weights::Weight};
use frame_support::{
construct_runtime, parameter_types,
traits::{Everything, Nothing},
weights::Weight,
};
use sp_core::H256;
use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32};
@@ -138,7 +142,7 @@ impl pallet_xcm::Config for Runtime {
type XcmRouter = XcmRouter;
// Anyone can execute XCM messages locally...
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
type XcmExecuteFilter = ();
type XcmExecuteFilter = Nothing;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;