Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch new #4

Merged
merged 14 commits into from
Sep 3, 2019
Prev Previous commit
Next Next commit
update chainspec
  • Loading branch information
sekisamu committed Sep 2, 2019
commit db78309eadd39e06ac93ad807389a44747481e3c
79 changes: 79 additions & 0 deletions node/cli/res/crayfish-fir.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ pub fn flaming_fir_config() -> Result<ChainSpec, String> {
ChainSpec::from_embedded(include_bytes!("../res/flaming-fir.json"))
}

pub fn crayfish_fir_config() -> Result<ChainSpec, String> {
ChainSpec::from_embedded(include_bytes!("../res/crayfish-fir.json"))
}

fn staging_testnet_config_genesis() -> GenesisConfig {
// stash, controller, session-key
// generated with secret:
Expand Down
5 changes: 4 additions & 1 deletion node/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub enum ChainSpec {
StagingTestnet,
/// Crayfish, darwinia network poc-2
CrayfishTestnet,
CrayfishTestnetFir,
}

/// Custom subcommands.
Expand Down Expand Up @@ -125,14 +126,16 @@ impl ChainSpec {
ChainSpec::LocalTestnet => chain_spec::local_testnet_config(),
ChainSpec::StagingTestnet => chain_spec::staging_testnet_config(),
ChainSpec::CrayfishTestnet => chain_spec::crayfish_testnet_config(),
ChainSpec::CrayfishTestnetFir => chain_spec::crayfish_fir_config()?,
})
}

pub(crate) fn from(s: &str) -> Option<Self> {
match s {
"dev" => Some(ChainSpec::Development),
"" => Some(ChainSpec::CrayfishTestnetFir),
"local" => Some(ChainSpec::LocalTestnet),
"" | "crayfish" => Some(ChainSpec::CrayfishTestnet),
"crayfish" => Some(ChainSpec::CrayfishTestnet),
"flaming-fir" => Some(ChainSpec::FlamingFir),
"staging" => Some(ChainSpec::StagingTestnet),
_ => None,
Expand Down
2 changes: 1 addition & 1 deletion node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl cli::IntoExit for Exit {

fn main() {
let version = VersionInfo {
name: "Darwinia POC-1 Node",
name: "Darwinia Crayfish Node",
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
executable_name: "darwinia",
Expand Down