mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 15:18:00 +00:00
ChainSpec extensions (#3692)
* Add some chainspec tests and make sure we validate it. * Manual implementation of Extension + Forks definitions. * Move chain spec to separate crate. * Allow using ChainSpec with extensions. * Renames. * Implement Extension derive. * Implement Extension for Forks. * Support specifying fork blocks. * make for_blocks work * Support forks correctly. * Add a bunch of docs. * Make fork blocks optional. * Add missing docs. * Fix build. * Use struct for check_block params. * Fix tests? * Clean up.
This commit is contained in:
committed by
Gavin Wood
parent
c555b9bf88
commit
667ee95f5d
@@ -44,7 +44,7 @@ use consensus::import_queue::{
|
||||
};
|
||||
use consensus::block_import::{BlockImport, ImportResult};
|
||||
use consensus::Error as ConsensusError;
|
||||
use consensus::{BlockOrigin, ForkChoiceStrategy, BlockImportParams, JustificationImport};
|
||||
use consensus::{BlockOrigin, ForkChoiceStrategy, BlockImportParams, BlockCheckParams, JustificationImport};
|
||||
use futures::prelude::*;
|
||||
use futures03::{StreamExt as _, TryStreamExt as _};
|
||||
use crate::{NetworkWorker, NetworkService, config::ProtocolId};
|
||||
@@ -431,8 +431,11 @@ impl<T: ?Sized> Clone for BlockImportAdapter<T> {
|
||||
impl<T: ?Sized + BlockImport<Block>> BlockImport<Block> for BlockImportAdapter<T> {
|
||||
type Error = T::Error;
|
||||
|
||||
fn check_block(&mut self, hash: Hash, parent_hash: Hash) -> Result<ImportResult, Self::Error> {
|
||||
self.0.lock().check_block(hash, parent_hash)
|
||||
fn check_block(
|
||||
&mut self,
|
||||
block: BlockCheckParams<Block>,
|
||||
) -> Result<ImportResult, Self::Error> {
|
||||
self.0.lock().check_block(block)
|
||||
}
|
||||
|
||||
fn import_block(
|
||||
|
||||
Reference in New Issue
Block a user