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
@@ -6,7 +6,7 @@ use std::collections::BTreeMap;
use polkadot_node_primitives::BlockWeight;
use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
use polkadot_primitives::v2::{BlockId, BlockNumber, Hash, Header};
use polkadot_primitives::v2::{BlockNumber, Hash, Header};
use sp_blockchain::Info as BlockInfo;
use sp_core::testing::TaskExecutor;
@@ -124,7 +124,7 @@ impl HeaderBackend<Block> for TestClient {
Ok(self.headers.get(&hash).cloned())
}
}
fn status(&self, _id: BlockId) -> sp_blockchain::Result<sp_blockchain::BlockStatus> {
fn status(&self, _hash: Hash) -> sp_blockchain::Result<sp_blockchain::BlockStatus> {
unimplemented!()
}
}