[][src]Trait sc_service::ChainSpec

pub trait ChainSpec: Send + BuildStorage {
    fn name(&self) -> &str;
fn id(&self) -> &str;
fn boot_nodes(&self) -> &[String];
fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>;
fn protocol_id(&self) -> Option<&str>;
fn properties(&self) -> Map<String, Value>;
fn extensions(&self) -> &dyn GetExtension;
fn add_boot_node(&mut self, addr: Multiaddr);
fn as_json(&self, raw: bool) -> Result<String, String>;
fn as_storage_builder(&self) -> &dyn BuildStorage; }

Common interface to GenericChainSpec

Required methods

fn name(&self) -> &str

Spec name.

fn id(&self) -> &str

Spec id.

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

A list of bootnode addresses.

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

Telemetry endpoints (if any)

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

Network protocol id.

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

Additional loosly-typed properties of the chain.

Returns an empty JSON object if 'properties' not defined in config

fn extensions(&self) -> &dyn GetExtension

Returns a reference to defined chain spec extensions.

fn add_boot_node(&mut self, addr: Multiaddr)

Add a bootnode to the list.

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

Return spec as JSON.

fn as_storage_builder(&self) -> &dyn BuildStorage

Return StorageBuilder for this spec.

Loading content...

Implementors

impl<G, E> ChainSpec for ChainSpec<G, E> where
    E: GetExtension + Serialize + Clone + Send,
    G: RuntimeGenesis
[src]

Loading content...