Skip to content

Commit

Permalink
Conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dastanbeksamatov committed Oct 5, 2023
1 parent e815219 commit 1a13f80
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ownership-chain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,10 @@ impl_opaque_keys! {
}
}

#[cfg(feature = "try-runtime")]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
/// Uncomment this to make it work with polkadot-js/apps
spec_name: create_runtime_str!("frontier-template"),
// spec_name: create_runtime_str!("laos-parachain"),
spec_name: create_runtime_str!("laos-parachain"),
impl_name: create_runtime_str!("laos-parachain"),
authoring_version: 1,
spec_version: 7,
Expand All @@ -238,6 +237,19 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
state_version: 1,
};

#[cfg(not(feature = "try-runtime"))]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frontier-template"),
impl_name: create_runtime_str!("frontier-template"),
authoring_version: 1,
spec_version: 7,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
state_version: 1,
};

/// This determines the average expected block time that we are targeting.
/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.
/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked
Expand Down

0 comments on commit 1a13f80

Please sign in to comment.