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:
Michal Kucharczyk
2022-12-21 12:15:59 +01:00
committed by GitHub
parent dd46523f82
commit ade78c2cf2
3 changed files with 184 additions and 184 deletions
+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)
}
}
}