mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 08:37:56 +00:00
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:
committed by
GitHub
parent
7aadc2aa3c
commit
749bcd1949
@@ -22,14 +22,14 @@ use sc_client_api::{backend::Finalizer, client::BlockBackend};
|
||||
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy};
|
||||
use sc_service::client::Client;
|
||||
use sp_consensus::{BlockOrigin, Error as ConsensusError};
|
||||
use sp_runtime::{generic::BlockId, traits::Block as BlockT, Justification, Justifications};
|
||||
use sp_runtime::{traits::Block as BlockT, Justification, Justifications};
|
||||
|
||||
/// Extension trait for a test client.
|
||||
pub trait ClientExt<Block: BlockT>: Sized {
|
||||
/// Finalize a block.
|
||||
fn finalize_block(
|
||||
&self,
|
||||
id: BlockId<Block>,
|
||||
hash: &Block::Hash,
|
||||
justification: Option<Justification>,
|
||||
) -> sp_blockchain::Result<()>;
|
||||
|
||||
@@ -75,10 +75,10 @@ where
|
||||
{
|
||||
fn finalize_block(
|
||||
&self,
|
||||
id: BlockId<Block>,
|
||||
hash: &Block::Hash,
|
||||
justification: Option<Justification>,
|
||||
) -> sp_blockchain::Result<()> {
|
||||
Finalizer::finalize_block(self, id, justification, true)
|
||||
Finalizer::finalize_block(self, hash, justification, true)
|
||||
}
|
||||
|
||||
fn genesis_hash(&self) -> <Block as BlockT>::Hash {
|
||||
|
||||
Reference in New Issue
Block a user