BlockId removal: refactor: HeaderBackend::header (#6418)

* BlockId removal: refactor: HeaderBackend::header

It changes the arguments of:
- `HeaderBackend::header`,
- `Client::header`

methods from: `BlockId<Block>` to: `Block::Hash`

This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)

* missed fixes

* BlockId removal: refactor: HeaderBackend::expect_header

It changes the arguments of `HeaderBackend::expect_header` method from: `BlockId<Block>` to: `Block::Hash`

* update lockfile for {"substrate"}

* misspell fixed

Co-authored-by: parity-processbot <>
This commit is contained in:
Michal Kucharczykandparity-processbot authored and GitHub committed 2022-12-20 11:00:13 +00:00
1 parent f687ab005a
commit fcc26d42e4
10 files changed
+228 -237

No files matched your search

+2 -2
View File
@@ -560,12 +560,12 @@ impl sc_client_api::StorageProvider<Block, crate::FullBackend> for Client {
}
impl sp_blockchain::HeaderBackend<Block> for Client {
fn header(&self, id: BlockId<Block>) -> sp_blockchain::Result<Option<Header>> {
fn header(&self, hash: Hash) -> sp_blockchain::Result<Option<Header>> {
with_client! {
self,
client,
{
client.header(&id)
client.header(hash)
}
}
}