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:
Michal Kucharczyk authored and GitHub committed 2022-10-20 15:50:59 +00:00
1 parent 749bcd1949
commit 42215038a3
5 files changed
+75 -77

No files matched your search

+4 -2
View File
@@ -1371,8 +1371,10 @@ pub(crate) mod tests {
let mut best_block_stream = best_block_streams.drain(..).next().unwrap();
net.peer(0).push_blocks(2, false);
// finalize 1 and 2 without justifications
backend.finalize_block(BlockId::number(1), None).unwrap();
backend.finalize_block(BlockId::number(2), None).unwrap();
let hashof1 = backend.blockchain().expect_block_hash_from_id(&BlockId::Number(1)).unwrap();
let hashof2 = backend.blockchain().expect_block_hash_from_id(&BlockId::Number(2)).unwrap();
backend.finalize_block(&hashof1, None).unwrap();
backend.finalize_block(&hashof2, None).unwrap();
let justif = create_finality_proof(2);
// create new session at block #2