mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Support both polkadot and kusama runtimes (#704)
* Allow both polkadot and kusama runtimes * Allow both polkadot and kusama runtimes * Make `collator` build * Removed kusama runtime * Introduced common runtime * Updated for latest substrate * Updated CI targets * Updated CI version check * Removed unused dependency * Pulled latests substrate * Pulled latest substrate * Fixed version * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * NEW_HEADS_IDENTIFIER moved to primitives * Updated CI check script * Fixed script * Set epoch duration for polkadot * ci: check_runtime for both runtimes Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: gabriel klawitter <gabreal@users.noreply.github.com>
This commit is contained in:
committed by
Gavin Wood
parent
9a9bbd1c2d
commit
a00d74d825
@@ -41,12 +41,19 @@ impl Default for ChainSpec {
|
||||
/// Get a chain config from a spec setting.
|
||||
impl ChainSpec {
|
||||
pub(crate) fn load(self) -> Result<service::ChainSpec, String> {
|
||||
Ok(match self {
|
||||
ChainSpec::Kusama => service::chain_spec::kusama_config()?,
|
||||
ChainSpec::Development => service::chain_spec::development_config(),
|
||||
ChainSpec::LocalTestnet => service::chain_spec::local_testnet_config(),
|
||||
ChainSpec::StagingTestnet => service::chain_spec::staging_testnet_config(),
|
||||
})
|
||||
match self {
|
||||
ChainSpec::Development => Ok(service::chain_spec::development_config()),
|
||||
ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
|
||||
ChainSpec::StagingTestnet => Ok(service::chain_spec::staging_testnet_config()),
|
||||
ChainSpec::Kusama => service::chain_spec::kusama_config(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn is_kusama(&self) -> bool {
|
||||
match self {
|
||||
ChainSpec::Development | ChainSpec::LocalTestnet | ChainSpec::StagingTestnet => false,
|
||||
ChainSpec::Kusama => true,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from(s: &str) -> Option<Self> {
|
||||
|
||||
Reference in New Issue
Block a user