Skip to content

Commit

Permalink
Remove unneeded Runtime variant
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed Jun 17, 2024
1 parent 0b4e305 commit 8be04b3
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions cumulus/polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ enum Runtime {
CollectivesPolkadot,
CollectivesWestend,
Glutton,
GluttonWestend,
BridgeHub(chain_spec::bridge_hubs::BridgeHubRuntimeType),
Coretime(chain_spec::coretime::CoretimeRuntimeType),
People(chain_spec::people::PeopleRuntimeType),
Expand Down Expand Up @@ -134,8 +133,6 @@ fn runtime(id: &str) -> Runtime {
Runtime::Coretime(
id.parse::<chain_spec::coretime::CoretimeRuntimeType>().expect("Invalid value"),
)
} else if id.starts_with("glutton-westend") {
Runtime::GluttonWestend
} else if id.starts_with("glutton") {
Runtime::Glutton
} else if id.starts_with(chain_spec::people::PeopleRuntimeType::ID_PREFIX) {
Expand Down Expand Up @@ -410,7 +407,7 @@ macro_rules! construct_partials {
)?;
$code
},
Runtime::GluttonWestend | Runtime::Glutton | Runtime::Shell | Runtime::Seedling => {
Runtime::Glutton | Runtime::Shell | Runtime::Seedling => {
let $partials = new_partial::<RuntimeApi, _>(
&$config,
crate::service::build_shell_import_queue,
Expand Down Expand Up @@ -477,7 +474,6 @@ macro_rules! construct_async_run {
},
Runtime::Shell |
Runtime::Seedling |
Runtime::GluttonWestend |
Runtime::Glutton => {
runner.async_run(|$config| {
let $components = new_partial::<RuntimeApi, _>(
Expand Down Expand Up @@ -842,17 +838,16 @@ async fn start_node<Network: sc_network::NetworkBackend<Block, Hash>>(
.map(|r| r.0)
.map_err(Into::into),

Runtime::Glutton | Runtime::GluttonWestend =>
crate::service::start_basic_lookahead_node::<Network>(
config,
polkadot_config,
collator_options,
id,
hwbench,
)
.await
.map(|r| r.0)
.map_err(Into::into),
Runtime::Glutton => crate::service::start_basic_lookahead_node::<Network>(
config,
polkadot_config,
collator_options,
id,
hwbench,
)
.await
.map(|r| r.0)
.map_err(Into::into),

Runtime::People(people_runtime_type) => match people_runtime_type {
chain_spec::people::PeopleRuntimeType::Kusama |
Expand Down

0 comments on commit 8be04b3

Please sign in to comment.