From 1d429ee3ea542c22bbf0014753646da12e095e19 Mon Sep 17 00:00:00 2001 From: Nikita Khateev Date: Wed, 31 Jul 2024 14:41:34 +0400 Subject: [PATCH] fix xcm constants (#268) --- evm-template/runtime/src/configs/xcm_config.rs | 5 +++-- evm-template/runtime/tests/constants_test.rs | 3 ++- generic-template/runtime/src/configs/xcm_config.rs | 5 +++-- generic-template/runtime/tests/constants_test.rs | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/evm-template/runtime/src/configs/xcm_config.rs b/evm-template/runtime/src/configs/xcm_config.rs index ffba733..c5aa48d 100644 --- a/evm-template/runtime/src/configs/xcm_config.rs +++ b/evm-template/runtime/src/configs/xcm_config.rs @@ -272,7 +272,8 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const MaxLockers: u32 = 0; + pub const MaxLockers: u32 = 8; + pub const MaxRemoteLockConsumers: u32 = 0; } impl pallet_xcm::Config for Runtime { @@ -283,7 +284,7 @@ impl pallet_xcm::Config for Runtime { type CurrencyMatcher = (); type ExecuteXcmOrigin = EnsureXcmOrigin; type MaxLockers = MaxLockers; - type MaxRemoteLockConsumers = MaxLockers; + type MaxRemoteLockConsumers = MaxRemoteLockConsumers; type RemoteLockConsumerIdentifier = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; diff --git a/evm-template/runtime/tests/constants_test.rs b/evm-template/runtime/tests/constants_test.rs index d5c8c44..3a81b27 100644 --- a/evm-template/runtime/tests/constants_test.rs +++ b/evm-template/runtime/tests/constants_test.rs @@ -234,7 +234,8 @@ mod xcm_tests { #[test] fn pallet_xcm_constants() { - assert_eq!(MaxLockers::get(), 0); + assert_eq!(MaxLockers::get(), 8); + assert_eq!(MaxRemoteLockConsumers::get(), 0); assert_eq!( ::VERSION_DISCOVERY_QUEUE_SIZE, 100 diff --git a/generic-template/runtime/src/configs/xcm_config.rs b/generic-template/runtime/src/configs/xcm_config.rs index 7abffad..80f9068 100644 --- a/generic-template/runtime/src/configs/xcm_config.rs +++ b/generic-template/runtime/src/configs/xcm_config.rs @@ -198,7 +198,8 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const MaxLockers: u32 = 0; + pub const MaxLockers: u32 = 8; + pub const MaxRemoteLockConsumers: u32 = 0; } impl pallet_xcm::Config for Runtime { @@ -209,7 +210,7 @@ impl pallet_xcm::Config for Runtime { type CurrencyMatcher = (); type ExecuteXcmOrigin = EnsureXcmOrigin; type MaxLockers = MaxLockers; - type MaxRemoteLockConsumers = MaxLockers; + type MaxRemoteLockConsumers = MaxRemoteLockConsumers; type RemoteLockConsumerIdentifier = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; diff --git a/generic-template/runtime/tests/constants_test.rs b/generic-template/runtime/tests/constants_test.rs index 8792255..4c3092f 100644 --- a/generic-template/runtime/tests/constants_test.rs +++ b/generic-template/runtime/tests/constants_test.rs @@ -233,7 +233,8 @@ mod xcm_tests { #[test] fn pallet_xcm_constants() { - assert_eq!(MaxLockers::get(), 0); + assert_eq!(MaxLockers::get(), 8); + assert_eq!(MaxRemoteLockConsumers::get(), 0); assert_eq!( ::VERSION_DISCOVERY_QUEUE_SIZE, 100