mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 05:47:58 +00:00
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:
committed by
GitHub
parent
f687ab005a
commit
fcc26d42e4
@@ -161,10 +161,7 @@ where
|
||||
&self,
|
||||
hash: Block::Hash,
|
||||
) -> sp_blockchain::Result<Option<<Block as BlockT>::Header>> {
|
||||
<Self as sp_blockchain::HeaderBackend<Block>>::header(
|
||||
self,
|
||||
generic::BlockId::<Block>::Hash(hash),
|
||||
)
|
||||
<Self as sp_blockchain::HeaderBackend<Block>>::header(self, hash)
|
||||
}
|
||||
fn number(
|
||||
&self,
|
||||
@@ -701,7 +698,7 @@ where
|
||||
return None
|
||||
};
|
||||
|
||||
let parent_hash = client.header(&BlockId::Hash(hash)).ok()??.parent_hash;
|
||||
let parent_hash = client.header(hash).ok()??.parent_hash;
|
||||
|
||||
Some(BlockInfo { hash, parent_hash, number })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user