mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
This reverts commit d531ba561c.
This commit is contained in:
committed by
GitHub
parent
d531ba561c
commit
b4457f555b
@@ -15,7 +15,10 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use log::info;
|
||||
#[cfg(not(feature = "service-rewr"))]
|
||||
use service::{IdentifyVariant, self};
|
||||
#[cfg(feature = "service-rewr")]
|
||||
use service_new::{IdentifyVariant, self as service};
|
||||
use sc_cli::{SubstrateCli, Result, RuntimeVersion, Role};
|
||||
use crate::cli::{Cli, Subcommand};
|
||||
use std::sync::Arc;
|
||||
@@ -45,7 +48,7 @@ impl SubstrateCli for Cli {
|
||||
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
let id = if id == "" {
|
||||
let n = get_exec_name().unwrap_or_default();
|
||||
["polkadot", "kusama", "westend", "rococo"].iter()
|
||||
["polkadot", "kusama", "westend"].iter()
|
||||
.cloned()
|
||||
.find(|&chain| n.starts_with(chain))
|
||||
.unwrap_or("polkadot")
|
||||
@@ -63,9 +66,6 @@ impl SubstrateCli for Cli {
|
||||
"westend-dev" => Box::new(service::chain_spec::westend_development_config()?),
|
||||
"westend-local" => Box::new(service::chain_spec::westend_local_testnet_config()?),
|
||||
"westend-staging" => Box::new(service::chain_spec::westend_staging_testnet_config()?),
|
||||
"rococo-staging" => Box::new(service::chain_spec::rococo_staging_testnet_config()?),
|
||||
"rococo-local" => Box::new(service::chain_spec::rococo_local_testnet_config()?),
|
||||
"rococo" => Box::new(service::chain_spec::rococo_config()?),
|
||||
path => {
|
||||
let path = std::path::PathBuf::from(path);
|
||||
|
||||
@@ -75,9 +75,7 @@ impl SubstrateCli for Cli {
|
||||
|
||||
// When `force_*` is given or the file name starts with the name of one of the known chains,
|
||||
// we use the chain spec for the specific chain.
|
||||
if self.run.force_rococo || starts_with("rococo") {
|
||||
Box::new(service::RococoChainSpec::from_json_file(path)?)
|
||||
} else if self.run.force_kusama || starts_with("kusama") {
|
||||
if self.run.force_kusama || starts_with("kusama") {
|
||||
Box::new(service::KusamaChainSpec::from_json_file(path)?)
|
||||
} else if self.run.force_westend || starts_with("westend") {
|
||||
Box::new(service::WestendChainSpec::from_json_file(path)?)
|
||||
@@ -93,8 +91,6 @@ impl SubstrateCli for Cli {
|
||||
&service::kusama_runtime::VERSION
|
||||
} else if spec.is_westend() {
|
||||
&service::westend_runtime::VERSION
|
||||
} else if spec.is_rococo() {
|
||||
&service::rococo_runtime::VERSION
|
||||
} else {
|
||||
&service::polkadot_runtime::VERSION
|
||||
}
|
||||
@@ -151,7 +147,7 @@ pub fn run() -> Result<()> {
|
||||
None,
|
||||
authority_discovery_enabled,
|
||||
grandpa_pause,
|
||||
).map(|full| full.task_manager),
|
||||
).map(|r| r.0),
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -184,8 +180,8 @@ pub fn run() -> Result<()> {
|
||||
let chain_spec = config.chain_spec.cloned_box();
|
||||
let network_config = config.network.clone();
|
||||
let service::NewFull { task_manager, client, network_status_sinks, .. }
|
||||
= service::build_full(
|
||||
config, None, authority_discovery_enabled, grandpa_pause,
|
||||
= service::new_full_nongeneric(
|
||||
config, None, authority_discovery_enabled, grandpa_pause, false,
|
||||
)?;
|
||||
let client = Arc::new(client);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user