mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
client: add a block blacklist extension (#4544)
* client: add a block blacklist extension * test-utils: fix client construction * client: fix rustdoc test
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
//! A set of APIs supported by the client along with their primitives.
|
||||
|
||||
use std::collections::HashSet;
|
||||
use futures::channel::mpsc;
|
||||
use sp_core::storage::StorageKey;
|
||||
use sp_runtime::{
|
||||
@@ -36,9 +37,16 @@ pub type FinalityNotifications<Block> = mpsc::UnboundedReceiver<FinalityNotifica
|
||||
|
||||
/// Expected hashes of blocks at given heights.
|
||||
///
|
||||
/// This may be used as chain spec extension to filter out known, unwanted forks.
|
||||
/// This may be used as chain spec extension to set trusted checkpoints, i.e.
|
||||
/// the client will refuse to import a block with a different hash at the given
|
||||
/// height.
|
||||
pub type ForkBlocks<Block> = Option<Vec<(NumberFor<Block>, <Block as BlockT>::Hash)>>;
|
||||
|
||||
/// Known bad block hashes.
|
||||
///
|
||||
/// This may be used as chain spec extension to filter out known, unwanted forks.
|
||||
pub type BadBlocks<Block> = Option<HashSet<<Block as BlockT>::Hash>>;
|
||||
|
||||
/// Figure out the block type for a given type (for now, just a `Client`).
|
||||
pub trait BlockOf {
|
||||
/// The type of the block.
|
||||
|
||||
Reference in New Issue
Block a user