Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
UMP: Acceptance criteria & enactment
  • Loading branch information
pepyakin committed Oct 29, 2020
commit c583a41077d25078a9e4d077e5332a14c57c8cbc
4 changes: 3 additions & 1 deletion runtime/common/src/paras_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ mod tests {
type WeightInfo = ();
}

impl router::Trait for Test { }
impl router::Trait for Test {
type UmpSink = ();
}

impl pallet_session::historical::Trait for Test {
type FullIdentification = pallet_staking::Exposure<u64, Balance>;
Expand Down
4 changes: 3 additions & 1 deletion runtime/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ impl crate::paras::Trait for Test {
type Origin = Origin;
}

impl crate::router::Trait for Test { }
impl crate::router::Trait for Test {
type UmpSink = crate::router::MockUmpSink;
}

impl crate::scheduler::Trait for Test { }

Expand Down
9 changes: 8 additions & 1 deletion runtime/parachains/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ mod dmp;
mod ump;

pub use dmp::QueueDownwardMessageError;
pub use ump::UmpSink;

pub trait Trait: frame_system::Trait + configuration::Trait {}
#[cfg(test)]
pub use ump::mock_sink::MockUmpSink;

pub trait Trait: frame_system::Trait + configuration::Trait {
/// A place where all received upward messages are funneled.
type UmpSink: UmpSink;
}

decl_storage! {
trait Store for Module<T: Trait> as Router {
Expand Down
Loading