Fix native version text on startup (#5618)

* Native version text was borked.

* Unfix benchmarking.
This commit is contained in:
Gavin Wood
2020-04-13 19:06:48 +02:00
committed by GitHub
parent 1e1b066817
commit a5da816e89
6 changed files with 20 additions and 5 deletions
+1
View File
@@ -5869,6 +5869,7 @@ dependencies = [
"sp-runtime",
"sp-state-machine",
"sp-utils",
"sp-version",
"structopt",
"substrate-prometheus-endpoint",
"tempfile",
@@ -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
)
}
}
}
+1 -1
View File
@@ -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" }
+5 -1
View File
@@ -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)?;
+1
View File
@@ -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" }
+7 -2
View File
@@ -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,
@@ -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),