diff --git a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs index 170762782a..0e5321df5e 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs @@ -159,20 +159,7 @@ pub trait FudgeHandle { Self::RelayRuntime, >::default(); - let mut host_config = HostConfiguration::default(); - host_config.max_downward_message_size = 1024; - host_config.hrmp_channel_max_capacity = 100; - host_config.hrmp_channel_max_message_size = 1024; - host_config.hrmp_channel_max_total_size = 1024; - host_config.hrmp_max_parachain_outbound_channels = 10; - host_config.hrmp_max_parachain_inbound_channels = 10; - host_config.hrmp_max_message_num_per_candidate = 100; - host_config.max_upward_queue_count = 10; - host_config.max_upward_queue_size = 1024; - host_config.max_upward_message_size = 1024; - host_config.max_upward_message_num_per_candidate = 100; - - configuration.config = host_config; + configuration.config = hrmp_host_config(); state .insert_storage( @@ -363,3 +350,20 @@ pub trait FudgeHandle { runtime } } + +pub fn hrmp_host_config>() -> HostConfiguration { + HostConfiguration { + max_downward_message_size: 1024, + hrmp_channel_max_capacity: 100, + hrmp_channel_max_message_size: 1024, + hrmp_channel_max_total_size: 1024, + hrmp_max_parachain_outbound_channels: 10, + hrmp_max_parachain_inbound_channels: 10, + hrmp_max_message_num_per_candidate: 100, + max_upward_queue_count: 10, + max_upward_queue_size: 1024, + max_upward_message_size: 1024, + max_upward_message_num_per_candidate: 100, + ..Default::default() + } +} diff --git a/runtime/integration-tests/src/generic/utils/xcm.rs b/runtime/integration-tests/src/generic/utils/xcm.rs index 97c788071b..f09724ec65 100644 --- a/runtime/integration-tests/src/generic/utils/xcm.rs +++ b/runtime/integration-tests/src/generic/utils/xcm.rs @@ -8,7 +8,10 @@ use staging_xcm::{ use crate::generic::{ config::Runtime, env::{Blocks, Env}, - envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, + envs::fudge_env::{ + handle::{hrmp_host_config, FudgeHandle}, + FudgeEnv, FudgeRelayRuntime, FudgeSupport, + }, }; pub fn setup_xcm(env: &mut FudgeEnv) { @@ -37,6 +40,10 @@ pub fn setup_xcm(env: &mut FudgeEnv) { }); env.relay_state_mut(|| { + polkadot_runtime_parachains::configuration::Pallet::>::force_set_active_config( + hrmp_host_config() + ); + assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< FudgeRelayRuntime, >::force_open_hrmp_channel(