Commit 9cebfce3 authored by ddorgan's avatar ddorgan Committed by Bastian Köcher
Browse files

Add spec for westend network (#792)

* add json

* Add spec changes

* Fix config method

* spaces -> tabs
parent 499c5a72
......@@ -28,6 +28,8 @@ pub enum ChainSpec {
LocalTestnet,
/// The Kusama network.
Kusama,
/// The Westend network,
Westend,
/// Whatever the current runtime is with the "global testnet" defaults.
StagingTestnet,
}
......@@ -45,6 +47,7 @@ impl ChainSpec {
ChainSpec::Development => Ok(service::chain_spec::development_config()),
ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
ChainSpec::StagingTestnet => Ok(service::chain_spec::staging_testnet_config()),
ChainSpec::Westend => service::chain_spec::westend_config(),
ChainSpec::Kusama => service::chain_spec::kusama_config(),
}
}
......@@ -54,6 +57,7 @@ impl ChainSpec {
"dev" => Some(ChainSpec::Development),
"local" => Some(ChainSpec::LocalTestnet),
"kusama" => Some(ChainSpec::Kusama),
"westend" => Some(ChainSpec::Westend),
"staging" => Some(ChainSpec::StagingTestnet),
"" => Some(ChainSpec::default()),
_ => None,
......
This diff is collapsed.
......@@ -60,6 +60,10 @@ pub fn kusama_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/kusama.json")[..])
}
pub fn westend_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/westend.json")[..])
}
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment