From bb4f3f497f97a5fd6232bc2e5647c40a12e30794 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Wed, 22 Jan 2020 15:50:12 +0300 Subject: [PATCH 1/3] remove and reformat --- bin/node-template/Cargo.toml | 2 - bin/node-template/src/chain_spec.rs | 62 +++++++++++++++-------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index f956bbb22193a..728610501c986 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -15,8 +15,6 @@ ctrlc = { version = "3.1.3", features = ["termination"] } log = "0.4.8" tokio = { version = "0.2", features = ["rt-threaded"] } parking_lot = "0.9.0" -codec = { package = "parity-scale-codec", version = "1.0.0" } -trie-root = "0.15.2" sp-io = { version = "2.0.0", path = "../../primitives/io" } sc-cli = { version = "0.8.0", path = "../../client/cli" } sp-core = { version = "2.0.0", path = "../../primitives/core" } diff --git a/bin/node-template/src/chain_spec.rs b/bin/node-template/src/chain_spec.rs index fae9feaf5113b..6afb67547bd6c 100644 --- a/bin/node-template/src/chain_spec.rs +++ b/bin/node-template/src/chain_spec.rs @@ -56,17 +56,19 @@ impl Alternative { Alternative::Development => ChainSpec::from_genesis( "Development", "dev", - || testnet_genesis(vec![ - get_authority_keys_from_seed("Alice"), - ], - get_account_id_from_seed::("Alice"), - vec![ + || testnet_genesis( + vec![ + get_authority_keys_from_seed("Alice"), + ], get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - ], - true), + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + ], + true, + ), vec![], None, None, @@ -76,26 +78,28 @@ impl Alternative { Alternative::LocalTestnet => ChainSpec::from_genesis( "Local Testnet", "local_testnet", - || testnet_genesis(vec![ - get_authority_keys_from_seed("Alice"), - get_authority_keys_from_seed("Bob"), - ], - get_account_id_from_seed::("Alice"), - vec![ + || testnet_genesis( + vec![ + get_authority_keys_from_seed("Alice"), + get_authority_keys_from_seed("Bob"), + ], get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - true), + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + true, + ), vec![], None, None, From f5943690e0089c8f9bb9de7e2bab3e99dd340022 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Wed, 22 Jan 2020 15:52:48 +0300 Subject: [PATCH 2/3] remove some more --- bin/node-template/Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 728610501c986..1f748ce554039 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -14,8 +14,6 @@ futures = "0.3.1" ctrlc = { version = "3.1.3", features = ["termination"] } log = "0.4.8" tokio = { version = "0.2", features = ["rt-threaded"] } -parking_lot = "0.9.0" -sp-io = { version = "2.0.0", path = "../../primitives/io" } sc-cli = { version = "0.8.0", path = "../../client/cli" } sp-core = { version = "2.0.0", path = "../../primitives/core" } sc-executor = { version = "0.8", path = "../../client/executor" } @@ -28,7 +26,6 @@ sc-consensus-aura = { version = "0.8", path = "../../client/consensus/aura" } sp-consensus-aura = { version = "0.8", path = "../../primitives/consensus/aura" } sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../client/finality-grandpa" } -grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } sc-client = { version = "0.8", path = "../../client/" } node-template-runtime = { version = "2.0.0", path = "runtime" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } From 0212a003f31a4b9177c58343b9ff70ce233aadc9 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Wed, 22 Jan 2020 15:54:37 +0300 Subject: [PATCH 3/3] commit Cargo.lock --- Cargo.lock | 4 ---- bin/node-template/Cargo.toml | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8030a4cd13ad2..c751f1dac33ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3221,8 +3221,6 @@ dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-basic-authorship 0.8.0", "sc-cli 0.8.0", "sc-client 0.8.0", @@ -3237,12 +3235,10 @@ dependencies = [ "sp-core 2.0.0", "sp-finality-grandpa 2.0.0", "sp-inherents 2.0.0", - "sp-io 2.0.0", "sp-runtime 2.0.0", "sp-transaction-pool 2.0.0", "substrate-build-script-utils 2.0.0", "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 1f748ce554039..cf3d7509f45d3 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -26,6 +26,7 @@ sc-consensus-aura = { version = "0.8", path = "../../client/consensus/aura" } sp-consensus-aura = { version = "0.8", path = "../../primitives/consensus/aura" } sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../client/finality-grandpa" } +grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } sc-client = { version = "0.8", path = "../../client/" } node-template-runtime = { version = "2.0.0", path = "runtime" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }