mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +00:00
BlockId removal: refactor: BlockImportOperation+Bknd::finalize_block (#12535)
* BlockId removal: refactor: BlockImportOperation+Bknd::finalize_block It changes the arguments of methods of `BlockImportOperation` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` `Backend::finalize_block` was also changed. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * Review suggestion applied thx to @davxy * trigger CI job
This commit is contained in:
committed by
GitHub
parent
749bcd1949
commit
42215038a3
@@ -878,17 +878,17 @@ where
|
||||
// plugable we cannot make a better choice here. usages that need
|
||||
// an accurate "best" block need to go through `SelectChain`
|
||||
// instead.
|
||||
operation.op.mark_head(BlockId::Hash(block))?;
|
||||
operation.op.mark_head(&block)?;
|
||||
}
|
||||
|
||||
let enacted = route_from_finalized.enacted();
|
||||
assert!(enacted.len() > 0);
|
||||
for finalize_new in &enacted[..enacted.len() - 1] {
|
||||
operation.op.mark_finalized(BlockId::Hash(finalize_new.hash), None)?;
|
||||
operation.op.mark_finalized(&finalize_new.hash, None)?;
|
||||
}
|
||||
|
||||
assert_eq!(enacted.last().map(|e| e.hash), Some(block));
|
||||
operation.op.mark_finalized(BlockId::Hash(block), justification)?;
|
||||
operation.op.mark_finalized(&block, justification)?;
|
||||
|
||||
if notify {
|
||||
let finalized =
|
||||
|
||||
Reference in New Issue
Block a user