Trait sc_service::ChainSpec [−][src]
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]
&mut self,
light_sync_state: SerializableLightSyncState
)
Hardcode infomation to allow light clients to sync quickly into the chain spec.
Trait Implementations
Implementors
impl<G, E> ChainSpec for ChainSpec<G, E> where
E: GetExtension + Serialize + Clone + Send + 'static,
G: RuntimeGenesis + 'static,
[src]
E: GetExtension + Serialize + Clone + Send + 'static,
G: RuntimeGenesis + 'static,
pub fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
[src]
pub fn name(&self) -> &str
[src]
pub fn id(&self) -> &str
[src]
pub fn chain_type(&self) -> ChainType
[src]
pub fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>
[src]
pub fn protocol_id(&self) -> Option<&str>
[src]
pub fn properties(&self) -> Map<String, Value>
[src]
pub fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)
[src]
pub fn extensions(&self) -> &dyn GetExtension
[src]
pub fn as_json(&self, raw: bool) -> Result<String, String>
[src]
pub fn as_storage_builder(&self) -> &dyn BuildStorage
[src]
pub fn cloned_box(&self) -> Box<dyn ChainSpec + 'static, Global>
[src]
pub fn set_storage(&mut self, storage: Storage)
[src]
pub fn set_light_sync_state(
&mut self,
light_sync_state: SerializableLightSyncState
)
[src]
&mut self,
light_sync_state: SerializableLightSyncState
)