BlockId removal: refactor: StorageProvider (#1770)

* BlockId removal: refactor: StorageProvider

It changes the arguments of `Backend::StorageProvider` trait from:
block: `BlockId<Block>` to: hash: `&Block::Hash`

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

Co-authored-by: parity-processbot <>
This commit is contained in:
Michal Kucharczyk
2022-10-18 16:34:14 +02:00
committed by GitHub
parent 975403e802
commit 45c71c0d04
2 changed files with 255 additions and 255 deletions
+253 -252
View File
File diff suppressed because it is too large Load Diff
@@ -20,7 +20,6 @@ use cumulus_primitives_core::{
relay_chain, InboundDownwardMessage, InboundHrmpMessage, ParaId, PersistedValidationData, relay_chain, InboundDownwardMessage, InboundHrmpMessage, ParaId, PersistedValidationData,
}; };
use sc_client_api::{Backend, StorageProvider}; use sc_client_api::{Backend, StorageProvider};
use sp_api::BlockId;
use sp_core::twox_128; use sp_core::twox_128;
use sp_inherents::{InherentData, InherentDataProvider}; use sp_inherents::{InherentData, InherentDataProvider};
use sp_runtime::traits::Block; use sp_runtime::traits::Block;
@@ -116,7 +115,7 @@ impl MockXcmConfig {
) -> Self { ) -> Self {
let starting_dmq_mqc_head = client let starting_dmq_mqc_head = client
.storage( .storage(
&BlockId::Hash(parent_block), &parent_block,
&sp_storage::StorageKey( &sp_storage::StorageKey(
[twox_128(&parachain_system_name.0), twox_128(b"LastDmqMqcHead")] [twox_128(&parachain_system_name.0), twox_128(b"LastDmqMqcHead")]
.concat() .concat()
@@ -131,7 +130,7 @@ impl MockXcmConfig {
let starting_hrmp_mqc_heads = client let starting_hrmp_mqc_heads = client
.storage( .storage(
&BlockId::Hash(parent_block), &parent_block,
&sp_storage::StorageKey( &sp_storage::StorageKey(
[twox_128(&parachain_system_name.0), twox_128(b"LastHrmpMqcHeads")] [twox_128(&parachain_system_name.0), twox_128(b"LastHrmpMqcHeads")]
.concat() .concat()