mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
BlockId removal: refactor: BlockBackend::block|block_status (#13014)
* BlockId removal: refactor: BlockBackend::block|block_status It changes the arguments of: - `BlockBackend::block` - `BlockBackend::block_status` method from: `BlockId<Block>` to: `Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * non-obvious reworks * doc fix * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
66cfd01f17
commit
9c69fc1b32
@@ -94,9 +94,9 @@ where
|
||||
let block_num = BlockId::Number(i.into());
|
||||
let parent_num = BlockId::Number(((i - 1) as u32).into());
|
||||
let consumed = self.consumed_weight(&block_num)?;
|
||||
let hash = self.client.expect_block_hash_from_id(&block_num)?;
|
||||
|
||||
let block =
|
||||
self.client.block(&block_num)?.ok_or(format!("Block {} not found", block_num))?;
|
||||
let block = self.client.block(hash)?.ok_or(format!("Block {} not found", block_num))?;
|
||||
let block = self.unsealed(block.block);
|
||||
let took = self.measure_block(&block, &parent_num)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user