Unverified Commit 9613681e authored by ferrell-code's avatar ferrell-code Committed by GitHub
Browse files

Parachains hrmp.rs to Frame V2 (#3475)

* migrate

* migrate runtimes

* runtimes compile

* ci

* trigger ci
parent a1d1b7e4
Pipeline #148517 passed with stages
in 44 minutes and 5 seconds
......@@ -1489,7 +1489,7 @@ construct_runtime! {
Initializer: parachains_initializer::{Pallet, Call, Storage} = 57,
Dmp: parachains_dmp::{Pallet, Call, Storage} = 58,
ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 59,
ParasHrmp: parachains_hrmp::{Pallet, Call, Storage, Event} = 60,
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event<T>} = 60,
ParasSessionInfo: parachains_session_info::{Pallet, Call, Storage} = 61,
// Parachain Onboarding Pallets. Start indices at 70 to leave room.
......
This diff is collapsed.
......@@ -701,15 +701,15 @@ impl<T: Config> Pallet<T> {
receipt.descriptor.para_id,
commitments.processed_downward_messages,
);
weight += <ump::Module<T>>::receive_upward_messages(
weight += <ump::Pallet<T>>::receive_upward_messages(
receipt.descriptor.para_id,
commitments.upward_messages,
);
weight += <hrmp::Module<T>>::prune_hrmp(
weight += <hrmp::Pallet<T>>::prune_hrmp(
receipt.descriptor.para_id,
T::BlockNumber::from(commitments.hrmp_watermark),
);
weight += <hrmp::Module<T>>::queue_outbound_hrmp(
weight += <hrmp::Pallet<T>>::queue_outbound_hrmp(
receipt.descriptor.para_id,
commitments.horizontal_messages,
);
......@@ -923,12 +923,12 @@ impl<T: Config> CandidateCheckContext<T> {
processed_downward_messages,
)?;
<ump::Module<T>>::check_upward_messages(&self.config, para_id, upward_messages)?;
<hrmp::Module<T>>::check_hrmp_watermark(
<hrmp::Pallet<T>>::check_hrmp_watermark(
para_id,
self.relay_parent_number,
hrmp_watermark,
)?;
<hrmp::Module<T>>::check_outbound_hrmp(&self.config, para_id, horizontal_messages)?;
<hrmp::Pallet<T>>::check_outbound_hrmp(&self.config, para_id, horizontal_messages)?;
Ok(())
}
......
......@@ -141,7 +141,7 @@ pub mod pallet {
T::DisputesHandler::initializer_initialize(now) +
dmp::Pallet::<T>::initializer_initialize(now) +
ump::Module::<T>::initializer_initialize(now) +
hrmp::Module::<T>::initializer_initialize(now);
hrmp::Pallet::<T>::initializer_initialize(now);
HasInitialized::<T>::set(Some(()));
......@@ -150,7 +150,7 @@ pub mod pallet {
fn on_finalize(_: T::BlockNumber) {
// reverse initialization order.
hrmp::Module::<T>::initializer_finalize();
hrmp::Pallet::<T>::initializer_finalize();
ump::Module::<T>::initializer_finalize();
dmp::Pallet::<T>::initializer_finalize();
T::DisputesHandler::initializer_finalize();
......@@ -240,7 +240,7 @@ impl<T: Config> Pallet<T> {
T::DisputesHandler::initializer_on_new_session(&notification);
dmp::Pallet::<T>::initializer_on_new_session(&notification, &outgoing_paras);
ump::Module::<T>::initializer_on_new_session(&notification, &outgoing_paras);
hrmp::Module::<T>::initializer_on_new_session(&notification, &outgoing_paras);
hrmp::Pallet::<T>::initializer_on_new_session(&notification, &outgoing_paras);
}
/// Should be called when a new session occurs. Buffers the session notification to be applied
......
......@@ -53,7 +53,7 @@ frame_support::construct_runtime!(
Initializer: initializer::{Pallet, Call, Storage},
Dmp: dmp::{Pallet, Call, Storage},
Ump: ump::{Pallet, Call, Storage, Event},
Hrmp: hrmp::{Pallet, Call, Storage, Event},
Hrmp: hrmp::{Pallet, Call, Storage, Event<T>},
SessionInfo: session_info::{Pallet, Call, Storage},
Disputes: disputes::{Pallet, Storage, Event<T>},
}
......
......@@ -322,7 +322,7 @@ pub fn dmq_contents<T: dmp::Config>(
pub fn inbound_hrmp_channels_contents<T: hrmp::Config>(
recipient: ParaId,
) -> BTreeMap<ParaId, Vec<InboundHrmpMessage<T::BlockNumber>>> {
<hrmp::Module<T>>::inbound_hrmp_channels_contents(recipient)
<hrmp::Pallet<T>>::inbound_hrmp_channels_contents(recipient)
}
/// Implementation for the `validation_code_by_hash` function of the runtime API.
......
......@@ -221,7 +221,7 @@ construct_runtime! {
Initializer: parachains_initializer::{Pallet, Call, Storage},
Dmp: parachains_dmp::{Pallet, Call, Storage},
Ump: parachains_ump::{Pallet, Call, Storage, Event},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event<T>, Config},
SessionInfo: parachains_session_info::{Pallet, Call, Storage},
// Parachain Onboarding Pallets
......
......@@ -543,7 +543,7 @@ construct_runtime! {
Scheduler: parachains_scheduler::{Pallet, Call, Storage},
ParasSudoWrapper: paras_sudo_wrapper::{Pallet, Call},
SessionInfo: parachains_session_info::{Pallet, Call, Storage},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event<T>},
Ump: parachains_ump::{Pallet, Call, Storage, Event},
Dmp: parachains_dmp::{Pallet, Call, Storage},
ParasDisputes: parachains_disputes::{Pallet, Storage, Event<T>},
......
......@@ -1080,7 +1080,7 @@ construct_runtime! {
Initializer: parachains_initializer::{Pallet, Call, Storage} = 48,
Dmp: parachains_dmp::{Pallet, Call, Storage} = 49,
ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 50,
ParasHrmp: parachains_hrmp::{Pallet, Call, Storage, Event} = 51,
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event<T>} = 51,
ParasSessionInfo: parachains_session_info::{Pallet, Call, Storage} = 52,
// Parachain Onboarding Pallets. Start indices at 60 to leave room.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment