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

Try #210

Merged
merged 3 commits into from
Dec 31, 2019
Merged

Try #210

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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