git.delta.rocks / unique-network / refs/commits / 7e0ba1d9645e

difftreelog

Adjust node name according to used runtime

Daniel Shiposha2022-03-05parent: #4657e25.patch.diff
in: master

4 files changed

modifiednode/cli/src/command.rsdiffbeforeafterboth
79impl SubstrateCli for Cli {79impl SubstrateCli for Cli {
80 // TODO use args80 // TODO use args
81 fn impl_name() -> String {81 fn impl_name() -> String {
82 "Opal Node".into()82 format!("{} Node", runtime::RUNTIME_NAME)
83 }83 }
8484
85 fn impl_version() -> String {85 fn impl_version() -> String {
88 // TODO use args88 // TODO use args
89 fn description() -> String {89 fn description() -> String {
90 format!(90 format!(
91 "Opal Node\n\nThe command-line arguments provided first will be \91 "{} Node\n\nThe command-line arguments provided first will be \
92 passed to the parachain node, while the arguments provided after -- will be passed \92 passed to the parachain node, while the arguments provided after -- will be passed \
93 to the relaychain node.\n\n\93 to the relaychain node.\n\n\
94 {} [parachain-args] -- [relaychain-args]",94 {} [parachain-args] -- [relaychain-args]",
95 runtime::RUNTIME_NAME,
95 Self::executable_name()96 Self::executable_name()
96 )97 )
97 }98 }
121impl SubstrateCli for RelayChainCli {122impl SubstrateCli for RelayChainCli {
122 // TODO use args123 // TODO use args
123 fn impl_name() -> String {124 fn impl_name() -> String {
124 "Opal Node".into()125 format!("{} Node", runtime::RUNTIME_NAME)
125 }126 }
126127
127 fn impl_version() -> String {128 fn impl_version() -> String {
128 env!("SUBSTRATE_CLI_IMPL_VERSION").into()129 env!("SUBSTRATE_CLI_IMPL_VERSION").into()
129 }130 }
130 // TODO use args131 // TODO use args
131 fn description() -> String {132 fn description() -> String {
132 "Opal Node\n\nThe command-line arguments provided first will be \
133 passed to the parachain node, while the arguments provided after -- will be passed \
134 to the relaychain node.\n\n\
135 parachain-collator [parachain-args] -- [relaychain-args]"
136 .into()133 format!(
134 "{} Node\n\nThe command-line arguments provided first will be \
135 passed to the parachain node, while the arguments provided after -- will be passed \
136 to the relaychain node.\n\n\
137 parachain-collator [parachain-args] -- [relaychain-args]",
138 runtime::RUNTIME_NAME
139 )
137 }140 }
138141
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -123,6 +123,8 @@
 // mod chain_extension;
 // use crate::chain_extension::{NFTExtension, Imbalance};
 
+pub const RUNTIME_NAME: &'static str = "Opal";
+
 pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
 
 /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -111,6 +111,8 @@
 // mod chain_extension;
 // use crate::chain_extension::{NFTExtension, Imbalance};
 
+pub const RUNTIME_NAME: &'static str = "Quartz";
+
 pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
 
 /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -111,6 +111,8 @@
 // mod chain_extension;
 // use crate::chain_extension::{NFTExtension, Imbalance};
 
+pub const RUNTIME_NAME: &'static str = "Unique";
+
 pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
 
 /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know