mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 05:17:24 +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
@@ -30,7 +30,7 @@ use consensus_common::import_queue::{
|
||||
use network::test::*;
|
||||
use network::test::{Block as TestBlock, PeersClient};
|
||||
use network::config::BoxFinalityProofRequestBuilder;
|
||||
use sr_primitives::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
|
||||
use sr_primitives::{generic::DigestItem, traits::{Block as BlockT, DigestFor, NumberFor}};
|
||||
use network::config::ProtocolConfig;
|
||||
use tokio::runtime::current_thread;
|
||||
use client::BlockchainEvents;
|
||||
@@ -179,10 +179,9 @@ impl<B: BlockImport<TestBlock>> BlockImport<TestBlock> for PanickingBlockImport<
|
||||
|
||||
fn check_block(
|
||||
&mut self,
|
||||
hash: Hash,
|
||||
parent_hash: Hash,
|
||||
block: BlockCheckParams<TestBlock>,
|
||||
) -> Result<ImportResult, Self::Error> {
|
||||
Ok(self.0.check_block(hash, parent_hash).expect("checking block failed"))
|
||||
Ok(self.0.check_block(block).expect("checking block failed"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user