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 d0f13b042a
commit 7871193f79
44 changed files with 373 additions and 558 deletions
+6 -6
View File
@@ -17,7 +17,7 @@
use cumulus_primitives_core::{
relay_chain, AbridgedHostConfiguration, AbridgedHrmpChannel, ParaId,
};
use polkadot_primitives::v2::UpgradeGoAhead;
use polkadot_primitives::UpgradeGoAhead;
use sp_runtime::traits::HashFor;
use sp_state_machine::MemoryDB;
use sp_std::collections::btree_map::BTreeMap;
@@ -41,8 +41,8 @@ pub struct RelayStateSproofBuilder {
pub relay_dispatch_queue_size: Option<(u32, u32)>,
pub hrmp_ingress_channel_index: Option<Vec<ParaId>>,
pub hrmp_egress_channel_index: Option<Vec<ParaId>>,
pub hrmp_channels: BTreeMap<relay_chain::v2::HrmpChannelId, AbridgedHrmpChannel>,
pub current_slot: relay_chain::v2::Slot,
pub hrmp_channels: BTreeMap<relay_chain::HrmpChannelId, AbridgedHrmpChannel>,
pub current_slot: relay_chain::Slot,
pub current_epoch: u64,
pub randomness: relay_chain::Hash,
}
@@ -88,7 +88,7 @@ impl RelayStateSproofBuilder {
}
self.hrmp_channels
.entry(relay_chain::v2::HrmpChannelId { sender, recipient: self.para_id })
.entry(relay_chain::HrmpChannelId { sender, recipient: self.para_id })
.or_insert_with(|| AbridgedHrmpChannel {
max_capacity: 0,
max_total_size: 0,
@@ -101,8 +101,8 @@ impl RelayStateSproofBuilder {
pub fn into_state_root_and_proof(
self,
) -> (polkadot_primitives::v2::Hash, sp_state_machine::StorageProof) {
let (db, root) = MemoryDB::<HashFor<polkadot_primitives::v2::Block>>::default_with_root();
) -> (polkadot_primitives::Hash, sp_state_machine::StorageProof) {
let (db, root) = MemoryDB::<HashFor<polkadot_primitives::Block>>::default_with_root();
let state_version = Default::default(); // for test using default.
let mut backend = sp_state_machine::TrieBackendBuilder::new(db, root).build();