referrerpolicy=no-referrer-when-downgrade
cumulus_test_service::chain_spec

Type Alias ChainSpec

Source
pub type ChainSpec = GenericChainSpec<Extensions>;
Expand description

Specialized ChainSpec for the normal parachain runtime.

Aliased Type§

struct ChainSpec { /* private fields */ }

Implementations

Source§

impl<E, EHF> ChainSpec<E, EHF>

Source

pub fn boot_nodes(&self) -> &[MultiaddrWithPeerId]

A list of bootnode addresses.

Source

pub fn name(&self) -> &str

Spec name.

Source

pub fn id(&self) -> &str

Spec id.

Source

pub fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>

Telemetry endpoints (if any)

Source

pub fn protocol_id(&self) -> Option<&str>

Network protocol id.

Source

pub fn fork_id(&self) -> Option<&str>

Optional network fork identifier.

Source

pub fn properties(&self) -> Map<String, Value>

Additional loosely-typed properties of the chain.

Returns an empty JSON object if ‘properties’ not defined in config

Source

pub fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)

Add a bootnode to the list.

Source

pub fn extensions(&self) -> &E

Returns a reference to the defined chain spec extensions.

Source

pub fn extensions_mut(&mut self) -> &mut E

Returns a mutable reference to the defined chain spec extensions.

Source

pub fn builder(code: &[u8], extensions: E) -> ChainSpecBuilder<E, EHF>

Provides a ChainSpec builder.

Source§

impl<E, EHF> ChainSpec<E, EHF>

Source

pub fn from_json_bytes( json: impl Into<Cow<'static, [u8]>>, ) -> Result<ChainSpec<E, EHF>, String>

Parse json content into a ChainSpec

Source

pub fn from_json_file(path: PathBuf) -> Result<ChainSpec<E, EHF>, String>

Parse json file into a ChainSpec

Source§

impl<E, EHF> ChainSpec<E, EHF>
where E: Serialize + Clone + 'static, EHF: HostFunctions,

Source

pub fn as_json(&self, raw: bool) -> Result<String, String>

Dump the chain specification to JSON string.

Trait Implementations

Source§

impl<E, EHF> BuildStorage for ChainSpec<E, EHF>
where EHF: HostFunctions,

Source§

fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String>

Assimilate the storage for this module into pre-existing overlays.
Source§

fn build_storage(&self) -> Result<Storage, String>

Build the storage out of this builder.
Source§

impl<E, EHF> ChainSpec for ChainSpec<E, EHF>
where E: GetExtension + Serialize + Clone + Send + Sync + 'static, EHF: HostFunctions,

Source§

fn boot_nodes(&self) -> &[MultiaddrWithPeerId]

A list of bootnode addresses.
Source§

fn name(&self) -> &str

Spec name.
Source§

fn id(&self) -> &str

Spec id.
Source§

fn chain_type(&self) -> ChainType

Type of the chain.
Source§

fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>

Telemetry endpoints (if any)
Source§

fn protocol_id(&self) -> Option<&str>

Network protocol id.
Source§

fn fork_id(&self) -> Option<&str>

Optional network fork identifier. None by default.
Source§

fn properties(&self) -> Map<String, Value>

Additional loosely-typed properties of the chain. Read more
Source§

fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)

Add a bootnode to the list.
Source§

fn extensions(&self) -> &dyn GetExtension

Returns a reference to the defined chain spec extensions.
Source§

fn extensions_mut(&mut self) -> &mut dyn GetExtension

Returns a mutable reference to the defined chain spec extensions.
Source§

fn as_json(&self, raw: bool) -> Result<String, String>

Return spec as JSON.
Source§

fn as_storage_builder(&self) -> &dyn BuildStorage

Return StorageBuilder for this spec.
Source§

fn cloned_box(&self) -> Box<dyn ChainSpec>

Returns a cloned Box<dyn ChainSpec>.
Source§

fn set_storage(&mut self, storage: Storage)

Set the storage that should be used by this chain spec. Read more
Source§

fn code_substitutes(&self) -> BTreeMap<String, Vec<u8>>

Returns code substitutes that should be used for the on chain wasm.
Source§

impl<E, EHF> Clone for ChainSpec<E, EHF>
where E: Clone,

Source§

fn clone(&self) -> ChainSpec<E, EHF>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more