BlockId removal: refactor: Finalizer (#12528)

* BlockId removal: refactor: Finalizer

It changes the arguments of methods of `Finalizer` trait from:
block: `BlockId<Block>` to: hash: `&Block::Hash`

This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)

* minor corrections

* failing test corrected

* minor rework
This commit is contained in:
Michal Kucharczyk
2022-10-20 08:44:04 +02:00
committed by GitHub
parent 7aadc2aa3c
commit 749bcd1949
16 changed files with 113 additions and 118 deletions
@@ -327,7 +327,7 @@ mod tests {
use sp_consensus::BlockOrigin;
use sp_finality_grandpa::GRANDPA_ENGINE_ID;
use sp_keyring::Ed25519Keyring;
use sp_runtime::{generic::BlockId, traits::Header as _};
use sp_runtime::traits::Header as _;
use std::sync::Arc;
use substrate_test_runtime_client::{
ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt, TestClientBuilder,
@@ -412,10 +412,7 @@ mod tests {
let justification = GrandpaJustification::from_commit(&client, 42, commit).unwrap();
client
.finalize_block(
BlockId::Hash(target_hash),
Some((GRANDPA_ENGINE_ID, justification.encode())),
)
.finalize_block(&target_hash, Some((GRANDPA_ENGINE_ID, justification.encode())))
.unwrap();
authority_set_changes.push((current_set_id, n));