Skip to content

Commit

Permalink
Merge pull request #210 from AurevoirXavier/try
Browse files Browse the repository at this point in the history
Try
  • Loading branch information
hackfisher authored Dec 31, 2019
2 parents 3c6d0be + 2317a6d commit 44e7efa
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 116 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "node-cli"
version = "0.2.0"
version = "0.4.6"
authors = ["Darwinia Network <hello@darwinia.network>"]
description = "Darwinia node implementation in Rust."
build = "build.rs"
Expand Down
310 changes: 225 additions & 85 deletions node/cli/res/icefrog.json

Large diffs are not rendered by default.

30 changes: 2 additions & 28 deletions node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct Extensions {
pub type ChainSpec = substrate_service::ChainSpec<GenesisConfig, Extensions>;

/// IceFrog testnet generator
pub fn icefrog_fir_config() -> Result<ChainSpec, String> {
pub fn icefrog_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/icefrog.json")[..])
}

Expand Down Expand Up @@ -308,34 +308,8 @@ pub fn development_config() -> ChainSpec {
)
}

/// Local testnet config (multivalidator Alice + Bob)
/// IceFrog local testnet config (multivalidator Alice + Bob)
pub fn local_testnet_config() -> ChainSpec {
fn local_testnet_genesis() -> GenesisConfig {
darwinia_genesis(
vec![
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
false,
)
}

ChainSpec::from_genesis(
"Local Testnet",
"local_testnet",
local_testnet_genesis,
vec![],
None,
None,
None,
Default::default(),
)
}

/// IceFrog testnet config (multivalidator Alice + Bob)
pub fn icefrog_testnet_config() -> ChainSpec {
fn icefrog_config_genesis() -> GenesisConfig {
darwinia_genesis(
vec![
Expand Down
2 changes: 1 addition & 1 deletion node/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl ChainSpec {
ChainSpec::Development => chain_spec::development_config(),
ChainSpec::LocalTestnet => chain_spec::local_testnet_config(),
ChainSpec::StagingTestnet => chain_spec::staging_testnet_config(),
ChainSpec::IceFrogTestnet => chain_spec::icefrog_testnet_config(),
ChainSpec::IceFrogTestnet => chain_spec::icefrog_testnet_config()?,
})
}

Expand Down

0 comments on commit 44e7efa

Please sign in to comment.