Trait sc_service::ChainSpec[][src]

pub trait ChainSpec: Send + Sync + BuildStorage {
    pub fn name(&self) -> &str;
pub fn id(&self) -> &str;
pub fn chain_type(&self) -> ChainType;
pub fn boot_nodes(&self) -> &[MultiaddrWithPeerId];
pub fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>;
pub fn protocol_id(&self) -> Option<&str>;
pub fn properties(&self) -> Map<String, Value>;
pub fn extensions(&self) -> &dyn GetExtension;
pub fn add_boot_node(&mut self, addr: MultiaddrWithPeerId);
pub fn as_json(&self, raw: bool) -> Result<String, String>;
pub fn as_storage_builder(&self) -> &dyn BuildStorage;
pub fn cloned_box(&self) -> Box<dyn ChainSpec + 'static, Global>;
pub fn set_storage(&mut self, storage: Storage);
pub fn set_light_sync_state(
        &mut self,
        light_sync_state: SerializableLightSyncState
    ); }

Common interface of a chain specification.

Required methods

pub fn name(&self) -> &str[src]

Spec name.

pub fn id(&self) -> &str[src]

Spec id.

pub fn chain_type(&self) -> ChainType[src]

Type of the chain.

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

A list of bootnode addresses.

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

Telemetry endpoints (if any)

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

Network protocol id.

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

Additional loosly-typed properties of the chain.

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

pub fn extensions(&self) -> &dyn GetExtension[src]

Returns a reference to defined chain spec extensions.

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

Add a bootnode to the list.

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

Return spec as JSON.

pub fn as_storage_builder(&self) -> &dyn BuildStorage[src]

Return StorageBuilder for this spec.

pub fn cloned_box(&self) -> Box<dyn ChainSpec + 'static, Global>[src]

Returns a cloned Box<dyn ChainSpec>.

pub fn set_storage(&mut self, storage: Storage)[src]

Set the storage that should be used by this chain spec.

This will be used as storage at genesis.

pub fn set_light_sync_state(
    &mut self,
    light_sync_state: SerializableLightSyncState
)
[src]

Hardcode infomation to allow light clients to sync quickly into the chain spec.

Loading content...

Trait Implementations

impl Debug for dyn ChainSpec + 'static[src]

Implementors

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

Loading content...