difftreelog
Make opal runtime mandatory
in: master
5 files changed
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -252,7 +252,6 @@
[dependencies.opal-runtime]
path = '../../runtime/opal'
-optional = true
[dependencies.up-data-structs]
path = "../../primitives/data-structs"
@@ -306,7 +305,7 @@
unique-rpc = { default-features = false, path = "../rpc" }
[features]
-default = ["unique-runtime", "quartz-runtime", "opal-runtime"]
+default = ["unique-runtime", "quartz-runtime"]
runtime-benchmarks = [
'unique-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks',
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -35,7 +35,6 @@
pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;
/// The `ChainSpec` parameterized for the opal runtime.
-#[cfg(feature = "opal-runtime")]
pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;
pub enum RuntimeId {
@@ -61,7 +60,6 @@
return RuntimeId::Quartz;
}
- #[cfg(feature = "opal-runtime")]
if self.id().starts_with("opal") {
return RuntimeId::Opal;
}
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -44,7 +44,6 @@
#[cfg(feature = "quartz-runtime")]
use crate::service::QuartzRuntimeExecutor;
-#[cfg(feature = "opal-runtime")]
use crate::service::OpalRuntimeExecutor;
use codec::Encode;
@@ -82,7 +81,7 @@
"" | "local" => Box::new(chain_spec::local_testnet_rococo_config()),
path => {
let path = std::path::PathBuf::from(path);
- let chain_spec = Box::new(sc_service::GenericChainSpec::<()>::from_json_file(
+ let chain_spec = Box::new(chain_spec::OpalChainSpec::from_json_file(
path.clone(),
)?) as Box<dyn sc_service::ChainSpec>;
@@ -93,9 +92,7 @@
#[cfg(feature = "quartz-runtime")]
RuntimeId::Quartz => Box::new(chain_spec::QuartzChainSpec::from_json_file(path)?),
- #[cfg(feature = "opal-runtime")]
RuntimeId::Opal => Box::new(chain_spec::OpalChainSpec::from_json_file(path)?),
-
RuntimeId::Unknown(chain) => return Err(no_runtime_err!(chain)),
}
}
@@ -147,9 +144,7 @@
#[cfg(feature = "quartz-runtime")]
RuntimeId::Quartz => &quartz_runtime::VERSION,
- #[cfg(feature = "opal-runtime")]
RuntimeId::Opal => &opal_runtime::VERSION,
-
RuntimeId::Unknown(chain) => panic!("{}", no_runtime_err!(chain)),
}
}
@@ -241,7 +236,6 @@
runner, $components, $cli, $cmd, $config, $( $code )*
),
- #[cfg(feature = "opal-runtime")]
RuntimeId::Opal => async_run_with_runtime!(
opal_runtime::RuntimeApi, OpalRuntimeExecutor,
runner, $components, $cli, $cmd, $config, $( $code )*
@@ -359,9 +353,7 @@
#[cfg(feature = "quartz-runtime")]
RuntimeId::Quartz => cmd.run::<Block, QuartzRuntimeExecutor>(config),
- #[cfg(feature = "opal-runtime")]
RuntimeId::Opal => cmd.run::<Block, OpalRuntimeExecutor>(config),
-
RuntimeId::Unknown(chain) => Err(no_runtime_err!(chain).into()),
})
} else {
@@ -438,7 +430,6 @@
.map(|r| r.0)
.map_err(Into::into),
- #[cfg(feature = "opal-runtime")]
RuntimeId::Opal => crate::service::start_node::<
opal_runtime::Runtime,
opal_runtime::RuntimeApi,
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -95,7 +95,6 @@
}
}
-#[cfg(feature = "opal-runtime")]
impl NativeExecutionDispatch for OpalRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
node/rpc/src/lib.rs.expdiffbeforeafterbothno changes