From 0ae14c766b1504a5c2baa3f86d1de1b87e449eae Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Wed, 21 Jun 2023 13:59:51 +0300 Subject: [PATCH] bump Substrate, Polkadot and Cumulus (#2223) --- bridges/primitives/messages/src/lib.rs | 15 +++++++++++++-- bridges/primitives/runtime/src/storage_proof.rs | 8 ++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/bridges/primitives/messages/src/lib.rs b/bridges/primitives/messages/src/lib.rs index 6a86563cd9b14..81841892c7660 100644 --- a/bridges/primitives/messages/src/lib.rs +++ b/bridges/primitives/messages/src/lib.rs @@ -167,9 +167,20 @@ impl OperatingMode for MessagesOperatingMode { /// Lane id which implements `TypeId`. #[derive( - Clone, Copy, Decode, Default, Encode, Eq, Ord, PartialOrd, PartialEq, TypeInfo, MaxEncodedLen, + Clone, + Copy, + Decode, + Default, + Encode, + Eq, + Ord, + PartialOrd, + PartialEq, + TypeInfo, + MaxEncodedLen, + Serialize, + Deserialize, )] -#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct LaneId(pub [u8; 4]); impl core::fmt::Debug for LaneId { diff --git a/bridges/primitives/runtime/src/storage_proof.rs b/bridges/primitives/runtime/src/storage_proof.rs index abc5a8d86544d..e5207d79266c4 100644 --- a/bridges/primitives/runtime/src/storage_proof.rs +++ b/bridges/primitives/runtime/src/storage_proof.rs @@ -25,10 +25,9 @@ use sp_trie::{ TrieDBBuilder, TrieHash, }; -use codec::{Codec, Decode, Encode}; +use codec::{Decode, Encode}; use hash_db::Hasher; use scale_info::TypeInfo; -use sp_state_machine::TrieBackend; use trie_db::{DBValue, Recorder, Trie}; use crate::Size; @@ -102,12 +101,13 @@ impl UnverifiedStorageProof { entries: &[(RawStorageKey, Option)], ) -> Result<(H::Out, UnverifiedStorageProof), StorageProofError> where - H::Out: Codec, + H::Out: codec::Codec, { let keys: Vec<_> = entries.iter().map(|(key, _)| key.clone()).collect(); let entries: Vec<_> = entries.iter().cloned().map(|(key, val)| (None, vec![(key, val)])).collect(); - let backend = TrieBackend::, H>::from((entries, state_version)); + let backend = + sp_state_machine::TrieBackend::, H>::from((entries, state_version)); let root = *backend.root(); Ok((root, UnverifiedStorageProof::try_from_db(backend.backend_storage(), root, keys)?))