mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 12:07:57 +00:00
sc-cli: Remove SubstrateCli::native_runtime_version function (#14511)
The native runtime will be removed in the near future and thus this function will not be required anymore. \# Code changes Downstream users just need to remove `native_runtime_version` from their implementation of the `SubstrateCli` trait.
This commit is contained in:
@@ -187,23 +187,18 @@ pub fn print_node_infos<C: SubstrateCli>(config: &Configuration) {
|
||||
.path()
|
||||
.map_or_else(|| "<unknown>".to_owned(), |p| p.display().to_string())
|
||||
);
|
||||
info!("⛓ Native runtime: {}", C::native_runtime_version(&config.chain_spec));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sc_network::config::NetworkConfiguration;
|
||||
use sc_service::{Arc, ChainType, GenericChainSpec, NoExtension};
|
||||
use std::{
|
||||
path::PathBuf,
|
||||
sync::atomic::{AtomicU64, Ordering},
|
||||
};
|
||||
|
||||
use sc_network::config::NetworkConfiguration;
|
||||
use sc_service::{Arc, ChainType, GenericChainSpec, NoExtension};
|
||||
use sp_runtime::create_runtime_str;
|
||||
use sp_version::create_apis_vec;
|
||||
|
||||
use super::*;
|
||||
|
||||
struct Cli;
|
||||
|
||||
impl SubstrateCli for Cli {
|
||||
@@ -237,23 +232,6 @@ mod tests {
|
||||
) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
Err("nope".into())
|
||||
}
|
||||
|
||||
fn native_runtime_version(
|
||||
_: &Box<dyn sc_service::ChainSpec>,
|
||||
) -> &'static sp_version::RuntimeVersion {
|
||||
const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
|
||||
spec_name: create_runtime_str!("spec"),
|
||||
impl_name: create_runtime_str!("name"),
|
||||
authoring_version: 0,
|
||||
spec_version: 0,
|
||||
impl_version: 0,
|
||||
apis: create_apis_vec!([]),
|
||||
transaction_version: 2,
|
||||
state_version: 0,
|
||||
};
|
||||
|
||||
&VERSION
|
||||
}
|
||||
}
|
||||
|
||||
fn create_runner() -> Runner<Cli> {
|
||||
|
||||
Reference in New Issue
Block a user