mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 17:55:42 +00:00
allow re-use and avoid compiling kusama parachain code (#5792)
* allow re-use and avoid compiling kusama parachain code * fixup removed trailing ; * make it compat with rustfmt +nightly
This commit is contained in:
committed by
GitHub
parent
72bde2889f
commit
26fa161ece
@@ -43,7 +43,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master",
|
|||||||
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["wasmtime", "db", "cli", "full-node", "trie-memory-tracker", "polkadot-native"]
|
default = ["wasmtime", "db", "cli", "hostperfcheck", "full-node", "trie-memory-tracker", "polkadot-native"]
|
||||||
wasmtime = ["sc-cli/wasmtime"]
|
wasmtime = ["sc-cli/wasmtime"]
|
||||||
db = ["service/db"]
|
db = ["service/db"]
|
||||||
cli = [
|
cli = [
|
||||||
@@ -55,7 +55,6 @@ cli = [
|
|||||||
"try-runtime-cli",
|
"try-runtime-cli",
|
||||||
"polkadot-client",
|
"polkadot-client",
|
||||||
"polkadot-node-core-pvf",
|
"polkadot-node-core-pvf",
|
||||||
"polkadot-performance-test",
|
|
||||||
]
|
]
|
||||||
runtime-benchmarks = ["service/runtime-benchmarks", "polkadot-node-metrics/runtime-benchmarks"]
|
runtime-benchmarks = ["service/runtime-benchmarks", "polkadot-node-metrics/runtime-benchmarks"]
|
||||||
trie-memory-tracker = ["sp-trie/memory-tracker"]
|
trie-memory-tracker = ["sp-trie/memory-tracker"]
|
||||||
@@ -63,6 +62,7 @@ full-node = ["service/full-node"]
|
|||||||
try-runtime = ["service/try-runtime"]
|
try-runtime = ["service/try-runtime"]
|
||||||
fast-runtime = ["service/fast-runtime"]
|
fast-runtime = ["service/fast-runtime"]
|
||||||
pyroscope = ["pyro"]
|
pyroscope = ["pyro"]
|
||||||
|
hostperfcheck = ["polkadot-performance-test"]
|
||||||
|
|
||||||
# Configure the native runtimes to use. Polkadot is enabled by default.
|
# Configure the native runtimes to use. Polkadot is enabled by default.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -248,12 +248,19 @@ macro_rules! unwrap_client {
|
|||||||
fn host_perf_check() -> Result<()> {
|
fn host_perf_check() -> Result<()> {
|
||||||
#[cfg(not(build_type = "release"))]
|
#[cfg(not(build_type = "release"))]
|
||||||
{
|
{
|
||||||
Err(PerfCheckError::WrongBuildType.into())
|
return Err(PerfCheckError::WrongBuildType.into())
|
||||||
}
|
}
|
||||||
#[cfg(build_type = "release")]
|
#[cfg(build_type = "release")]
|
||||||
{
|
{
|
||||||
crate::host_perf_check::host_perf_check()?;
|
#[cfg(not(feature = "hostperfcheck"))]
|
||||||
Ok(())
|
{
|
||||||
|
return Err(PerfCheckError::FeatureNotEnabled { feature: "hostperfcheck" }.into())
|
||||||
|
}
|
||||||
|
#[cfg(feature = "hostperfcheck")]
|
||||||
|
{
|
||||||
|
crate::host_perf_check::host_perf_check()?;
|
||||||
|
return Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ mod cli;
|
|||||||
mod command;
|
mod command;
|
||||||
#[cfg(feature = "cli")]
|
#[cfg(feature = "cli")]
|
||||||
mod error;
|
mod error;
|
||||||
#[cfg(all(feature = "cli", build_type = "release"))]
|
#[cfg(all(feature = "hostperfcheck", build_type = "release"))]
|
||||||
mod host_perf_check;
|
mod host_perf_check;
|
||||||
|
|
||||||
#[cfg(feature = "full-node")]
|
#[cfg(feature = "full-node")]
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ pub enum PerfCheckError {
|
|||||||
#[error("This subcommand is only available in release mode")]
|
#[error("This subcommand is only available in release mode")]
|
||||||
WrongBuildType,
|
WrongBuildType,
|
||||||
|
|
||||||
|
#[error("This subcommand is only available when compiled with `{feature}`")]
|
||||||
|
FeatureNotEnabled { feature: &'static str },
|
||||||
|
|
||||||
#[error("No wasm code found for running the performance test")]
|
#[error("No wasm code found for running the performance test")]
|
||||||
WasmBinaryMissing,
|
WasmBinaryMissing,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user