mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 06:17:56 +00:00
Breakdown the Router module on Dmp, Ump, Hrmp modules (#1939)
* Guide: Split router module in guide. Now we have: DMP, UMP and Router module. * Add a glossary entry for what used to be called Router * Extract DMP * Extract UMP * Extract HRMP * Switch over to new modules * Router: goodbye sweet prince * Link to messaging overview for details. * Update missed rococo and test runtimes. * Commit destroyed by rebase changes * Don't deprecate Router but rather make it a meta-project Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> * Fix typos suggestion Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> * Fix repetition in the impl guide * Clarify that processed_downward_messages has the u32 type * Remove the router subdir. * Deabbreviate DMP,UMP,HRMP Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
This commit is contained in:
@@ -23,13 +23,12 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::ensure_root;
|
||||
use runtime_parachains::{
|
||||
router,
|
||||
paras::{self, ParaGenesisArgs},
|
||||
dmp, ump, hrmp, paras::{self, ParaGenesisArgs},
|
||||
};
|
||||
use primitives::v1::Id as ParaId;
|
||||
|
||||
/// The module's configuration trait.
|
||||
pub trait Trait: paras::Trait + router::Trait { }
|
||||
pub trait Trait: paras::Trait + dmp::Trait + ump::Trait + hrmp::Trait { }
|
||||
|
||||
decl_error! {
|
||||
pub enum Error for Module<T: Trait> { }
|
||||
@@ -48,7 +47,7 @@ decl_module! {
|
||||
genesis: ParaGenesisArgs,
|
||||
) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
paras::Module::<T>::schedule_para_initialize(id, genesis);
|
||||
runtime_parachains::schedule_para_initialize::<T>(id, genesis);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -56,8 +55,7 @@ decl_module! {
|
||||
#[weight = (1_000, DispatchClass::Operational)]
|
||||
pub fn sudo_schedule_para_cleanup(origin, id: ParaId) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
paras::Module::<T>::schedule_para_cleanup(id);
|
||||
router::Module::<T>::schedule_para_cleanup(id);
|
||||
runtime_parachains::schedule_para_cleanup::<T>(id);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user