Remove kusama and polkadot runtime crates (#1731)

This pull request is removing the Kusama and Polkadot runtime crates. As
still some crates dependent on the runtime crates, this pull request is
doing some more changes.

- It removes the `hostperfcheck` CLI command. This CLI command could
compare the current node against the standard hardware by doing some
checks. Later we added the hardware benchmark feature to Substrate. This
hardware benchmark is running on every node startup and prints a warning
if the current node is too slow. This makes this CLI command a duplicate
that was also depending on the kusama runtime.

- The pull request is removing the emulated integration tests that were
requiring the Kusama or Polkadot runtime crates.
This commit is contained in:
Bastian Köcher
2023-09-29 09:54:11 +02:00
committed by GitHub
parent 4902db2198
commit bf90cb0b73
202 changed files with 49 additions and 40336 deletions
-27
View File
@@ -167,26 +167,6 @@ fn set_default_ss58_version(spec: &Box<dyn service::ChainSpec>) {
sp_core::crypto::set_default_ss58_version(ss58_version);
}
/// Runs performance checks.
/// Should only be used in release build since the check would take too much time otherwise.
fn host_perf_check() -> Result<()> {
#[cfg(not(feature = "hostperfcheck"))]
{
return Err(Error::FeatureNotEnabled { feature: "hostperfcheck" }.into())
}
#[cfg(all(not(build_type = "release"), feature = "hostperfcheck"))]
{
return Err(PerfCheckError::WrongBuildType.into())
}
#[cfg(all(feature = "hostperfcheck", build_type = "release"))]
{
crate::host_perf_check::host_perf_check()?;
return Ok(())
}
}
/// Launch a node, accepting arguments just like a regular node,
/// accepts an alternative overseer generator, to adjust behavior
/// for integration tests as needed.
@@ -509,13 +489,6 @@ pub fn run() -> Result<()> {
_ => Err(Error::CommandNotImplemented),
}
},
Some(Subcommand::HostPerfCheck) => {
let mut builder = sc_cli::LoggerBuilder::new("");
builder.with_colors(true);
builder.init()?;
host_perf_check()
},
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.to_owned().into()),