timechain_runtime/
variants.rs#[cfg(not(any(feature = "testnet", feature = "develop")))]
pub const RUNTIME_VARIANT: &str = "mainnet";
#[cfg(all(not(feature = "testnet"), feature = "develop"))]
pub const RUNTIME_VARIANT: &str = "staging";
#[cfg(all(feature = "testnet", not(feature = "develop")))]
pub const RUNTIME_VARIANT: &str = "testnet";
#[cfg(all(feature = "testnet", feature = "develop"))]
pub const RUNTIME_VARIANT: &str = "develop";
#[macro_export]
macro_rules! main_test_or_dev {
($main:expr, $test:expr, $dev:expr) => {
if cfg!(feature = "develop") {
$dev
} else if cfg!(feature = "testnet") {
$test
} else {
$main
}
};
}
#[macro_export]
macro_rules! main_or_test {
($main:expr, $test:expr) => {
if cfg!(feature = "testnet") {
$test
} else {
$main
}
};
}
#[macro_export]
macro_rules! prod_or_dev {
($prod:expr, $dev:expr) => {
if cfg!(feature = "develop") {
$dev
} else {
$prod
}
};
}