Skip to content
Merged
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
16 changes: 10 additions & 6 deletions node/src/chain_spec/localnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use super::*;

pub fn localnet_config() -> Result<ChainSpec, String> {
pub fn localnet_config(single_authority: bool) -> Result<ChainSpec, String> {
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;

// Give front-ends necessary data to present to users
Expand Down Expand Up @@ -32,11 +32,15 @@ pub fn localnet_config() -> Result<ChainSpec, String> {
.with_genesis_config_patch(localnet_genesis(
// Initial PoA authorities (Validators)
// aura | grandpa
vec![
// Keys for debug
authority_keys_from_seed("Alice"),
authority_keys_from_seed("Bob"),
],
if single_authority {
// single authority allows you to run the network using a single node
vec![authority_keys_from_seed("Alice")]
} else {
vec![
authority_keys_from_seed("Alice"),
authority_keys_from_seed("Bob"),
]
},
// Pre-funded accounts
true,
))
Expand Down
3 changes: 2 additions & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ impl SubstrateCli for Cli {

fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"local" => Box::new(chain_spec::localnet::localnet_config()?),
"dev" => Box::new(chain_spec::localnet::localnet_config(true)?),
"local" => Box::new(chain_spec::localnet::localnet_config(false)?),
"finney" => Box::new(chain_spec::finney::finney_mainnet_config()?),
"devnet" => Box::new(chain_spec::devnet::devnet_config()?),
"" | "test_finney" => Box::new(chain_spec::testnet::finney_testnet_config()?),
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 208,
spec_version: 209,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down