mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 14:41:02 +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
@@ -16,9 +16,8 @@
|
||||
|
||||
//! Chain utilities.
|
||||
|
||||
use crate::RuntimeGenesis;
|
||||
use crate::error;
|
||||
use crate::chain_spec::ChainSpec;
|
||||
use chain_spec::{ChainSpec, RuntimeGenesis, Extension};
|
||||
|
||||
/// Defines the logic for an operation exporting blocks within a range.
|
||||
#[macro_export]
|
||||
@@ -222,8 +221,9 @@ macro_rules! revert_chain {
|
||||
}
|
||||
|
||||
/// Build a chain spec json
|
||||
pub fn build_spec<G>(spec: ChainSpec<G>, raw: bool) -> error::Result<String>
|
||||
where G: RuntimeGenesis,
|
||||
pub fn build_spec<G, E>(spec: ChainSpec<G, E>, raw: bool) -> error::Result<String> where
|
||||
G: RuntimeGenesis,
|
||||
E: Extension,
|
||||
{
|
||||
Ok(spec.to_json(raw)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user