Newer
Older
new_light::<westend_runtime::RuntimeApi, WestendExecutor>(config)
} else {
new_light::<polkadot_runtime::RuntimeApi, PolkadotExecutor>(config)
}
}
#[cfg(feature = "full-node")]
is_collator: IsCollator,
jaeger_agent: Option<std::net::SocketAddr>,
) -> Result<NewFull<Client>, Error> {
let isolation_strategy = {
#[cfg(not(any(target_os = "android", target_os = "unknown")))]
{
let cache_base_path = config.database.path();
IsolationStrategy::external_process_with_caching(cache_base_path)
}
#[cfg(any(target_os = "android", target_os = "unknown"))]
{
IsolationStrategy::InProcess
}
};
if config.chain_spec.is_rococo() {
new_full::<rococo_runtime::RuntimeApi, RococoExecutor>(
config,
is_collator,
isolation_strategy,
).map(|full| full.with_client(Client::Rococo))
} else if config.chain_spec.is_kusama() {
new_full::<kusama_runtime::RuntimeApi, KusamaExecutor>(
config,
is_collator,
isolation_strategy,
).map(|full| full.with_client(Client::Kusama))
} else if config.chain_spec.is_westend() {
new_full::<westend_runtime::RuntimeApi, WestendExecutor>(
config,
is_collator,
isolation_strategy,
).map(|full| full.with_client(Client::Westend))
} else {
new_full::<polkadot_runtime::RuntimeApi, PolkadotExecutor>(
config,
is_collator,
isolation_strategy,
).map(|full| full.with_client(Client::Polkadot))