Skip to content

Commit

Permalink
Fix native version text on startup (paritytech#5618)
Browse files Browse the repository at this point in the history
* Native version text was borked.

* Unfix benchmarking.
  • Loading branch information
gavofyork authored Apr 13, 2020
1 parent 48b8adb commit 469bb4b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion bin/node-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ pub fn run() -> sc_cli::Result<()> {
}
None => {
let runner = cli.create_runner(&cli.run)?;
runner.run_node(service::new_light, service::new_full)
runner.run_node(
service::new_light,
service::new_full,
node_template_runtime::VERSION
)
}
}
}
2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ sp-inherents = { version = "2.0.0-alpha.5", path = "../../../primitives/inherent
sp-keyring = { version = "2.0.0-alpha.5", path = "../../../primitives/keyring" }
sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" }

# client dependencies
sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" }
sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" }
sc-chain-spec = { version = "2.0.0-alpha.5", path = "../../../client/chain-spec" }
sc-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../client/transaction-pool" }
sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" }
sc-network = { version = "0.8.0-alpha.5", path = "../../../client/network" }
sc-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../client/consensus/babe" }
grandpa = { version = "0.8.0-alpha.5", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
Expand Down
6 changes: 5 additions & 1 deletion bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ pub fn run() -> Result<()> {
match &cli.subcommand {
None => {
let runner = cli.create_runner(&cli.run)?;
runner.run_node(service::new_light, service::new_full)
runner.run_node(
service::new_light,
service::new_full,
node_runtime::VERSION
)
}
Some(Subcommand::Inspect(cmd)) => {
let runner = cli.create_runner(cmd)?;
Expand Down
1 change: 1 addition & 0 deletions client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ sp-blockchain = { version = "2.0.0-alpha.5", path = "../../primitives/blockchain
sc-network = { version = "0.8.0-alpha.5", path = "../network" }
sp-runtime = { version = "2.0.0-alpha.5", path = "../../primitives/runtime" }
sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" }
sp-version = { version = "2.0.0-alpha.5", path = "../../primitives/version" }
sp-core = { version = "2.0.0-alpha.5", path = "../../primitives/core" }
sc-service = { version = "0.8.0-alpha.5", default-features = false, path = "../service" }
sp-state-machine = { version = "0.8.0-alpha.5", path = "../../primitives/state-machine" }
Expand Down
9 changes: 7 additions & 2 deletions client/cli/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ impl<C: SubstrateCli> Runner<C> {

/// A helper function that runs an `AbstractService` with tokio and stops if the process receives
/// the signal `SIGTERM` or `SIGINT`.
pub fn run_node<FNL, FNF, SL, SF>(self, new_light: FNL, new_full: FNF) -> Result<()>
where
pub fn run_node<FNL, FNF, SL, SF>(
self,
new_light: FNL,
new_full: FNF,
runtime_version: sp_version::RuntimeVersion,
) -> Result<()> where
FNL: FnOnce(Configuration) -> sc_service::error::Result<SL>,
FNF: FnOnce(Configuration) -> sc_service::error::Result<SF>,
SL: AbstractService + Unpin,
Expand All @@ -152,6 +156,7 @@ impl<C: SubstrateCli> Runner<C> {
info!("📋 Chain specification: {}", self.config.chain_spec.name());
info!("🏷 Node name: {}", self.config.network.node_name);
info!("👤 Role: {}", self.config.display_role());
info!("⛓ Native runtime: {}", runtime_version);

match self.config.role {
Role::Light => self.run_service_until_exit(new_light),
Expand Down

0 comments on commit 469bb4b

Please sign in to comment.