Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix(cli): add panic
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy-bebug committed Jun 27, 2023
1 parent 49903bc commit c3e8f3d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions node/cli/src/para/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ pub fn run() -> Result<()> {
.map_err(|e| format!("Error: {:?}", e))?;

#[cfg(feature = "ajuna")]
{
runner.async_run(|_| {
if cfg!(feature = "ajuna") {
return runner.async_run(|_| {
Ok((
cmd.run::<AjunaBlock, HostFunctionsOf<AjunaRuntimeExecutor>, _>(Some(
timestamp_with_aura_info::<AjunaBlock>(6000),
Expand All @@ -338,7 +338,8 @@ pub fn run() -> Result<()> {
}
#[cfg(feature = "bajun")]
{
runner.async_run(|_| {
#[allow(clippy::needless_return)]
return runner.async_run(|_| {
Ok((
cmd.run::<BajunBlock, HostFunctionsOf<BajunRuntimeExecutor>, _>(Some(
timestamp_with_aura_info::<BajunBlock>(6000),
Expand All @@ -347,6 +348,8 @@ pub fn run() -> Result<()> {
))
})
}
#[cfg(not(feature = "bajun"))]
panic!("No runtime feature (bajun, ajuna) is enabled")
},
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("Try-runtime was not enabled when building the node. \
Expand Down

0 comments on commit c3e8f3d

Please sign in to comment.