BlockId removal: refactor: HeaderBackend::status (#6459)

* BlockId removal: refactor: HeaderBackend::status

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

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

* Update node/core/chain-api/src/tests.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* unused import removed

* update lockfile for {"substrate"}

Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
authored and GitHub committed 2022-12-21 11:15:59 +00:00
1 parent dd46523f82
commit ade78c2cf2
3 files changed
+184 -184

No files matched your search

+2 -2
View File
@@ -580,12 +580,12 @@ impl sp_blockchain::HeaderBackend<Block> for Client {
}
}
fn status(&self, id: BlockId<Block>) -> sp_blockchain::Result<sp_blockchain::BlockStatus> {
fn status(&self, hash: Hash) -> sp_blockchain::Result<sp_blockchain::BlockStatus> {
with_client! {
self,
client,
{
client.status(id)
client.status(hash)
}
}
}