Use primitives reexported from polkadot_primitives crate root (#2067)

* Use primitives reexported from `polkadot_primitives` crate root

* restart CI

* Fixes after merge

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
s0me0ne-unkn0wn
2023-01-11 13:06:58 +01:00
committed by GitHub
parent 1ad62790fd
commit 7d8d4d2106
44 changed files with 373 additions and 558 deletions
+8 -8
View File
@@ -28,21 +28,21 @@ pub use polkadot_parachain::primitives::{
DmpMessageHandler, Id as ParaId, IsSystem, UpwardMessage, ValidationParams, XcmpMessageFormat,
XcmpMessageHandler,
};
pub use polkadot_primitives::v2::{
pub use polkadot_primitives::{
AbridgedHostConfiguration, AbridgedHrmpChannel, PersistedValidationData,
};
/// A module that re-exports relevant relay chain definitions.
pub mod relay_chain {
pub use polkadot_core_primitives::*;
pub use polkadot_primitives::{runtime_api, v2, v2::well_known_keys};
pub use polkadot_primitives::*;
}
/// An inbound HRMP message.
pub type InboundHrmpMessage = polkadot_primitives::v2::InboundHrmpMessage<relay_chain::BlockNumber>;
pub type InboundHrmpMessage = polkadot_primitives::InboundHrmpMessage<relay_chain::BlockNumber>;
/// And outbound HRMP message
pub type OutboundHrmpMessage = polkadot_primitives::v2::OutboundHrmpMessage<ParaId>;
pub type OutboundHrmpMessage = polkadot_primitives::OutboundHrmpMessage<ParaId>;
/// Error description of a message send failure.
#[derive(Eq, PartialEq, Copy, Clone, RuntimeDebug, Encode, Decode)]
@@ -204,11 +204,11 @@ pub struct CollationInfoV1 {
/// The horizontal messages sent by the parachain.
pub horizontal_messages: Vec<OutboundHrmpMessage>,
/// New validation code.
pub new_validation_code: Option<relay_chain::v2::ValidationCode>,
pub new_validation_code: Option<relay_chain::ValidationCode>,
/// The number of messages processed from the DMQ.
pub processed_downward_messages: u32,
/// The mark which specifies the block number up to which all inbound HRMP messages are processed.
pub hrmp_watermark: relay_chain::v2::BlockNumber,
pub hrmp_watermark: relay_chain::BlockNumber,
}
impl CollationInfoV1 {
@@ -233,11 +233,11 @@ pub struct CollationInfo {
/// The horizontal messages sent by the parachain.
pub horizontal_messages: Vec<OutboundHrmpMessage>,
/// New validation code.
pub new_validation_code: Option<relay_chain::v2::ValidationCode>,
pub new_validation_code: Option<relay_chain::ValidationCode>,
/// The number of messages processed from the DMQ.
pub processed_downward_messages: u32,
/// The mark which specifies the block number up to which all inbound HRMP messages are processed.
pub hrmp_watermark: relay_chain::v2::BlockNumber,
pub hrmp_watermark: relay_chain::BlockNumber,
/// The head data, aka encoded header, of the block that corresponds to the collation.
pub head_data: HeadData,
}