mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
This reverts commit d531ba561c.
This commit is contained in:
committed by
GitHub
parent
d531ba561c
commit
b4457f555b
@@ -24,7 +24,8 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas
|
||||
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
service = { package = "polkadot-service-new", path = "../node/service", default-features = false, optional = true }
|
||||
service = { package = "polkadot-service", path = "../service", default-features = false, optional = true }
|
||||
service-new = { package = "polkadot-service-new", path = "../node/service", default-features = false, optional = true }
|
||||
|
||||
tokio = { version = "0.2.13", features = ["rt-threaded"], optional = true }
|
||||
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
|
||||
@@ -42,7 +43,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master",
|
||||
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
[features]
|
||||
default = [ "wasmtime", "db", "cli", "full-node", "trie-memory-tracker" ]
|
||||
default = [ "wasmtime", "db", "cli", "service-old", "trie-memory-tracker" ]
|
||||
wasmtime = [ "sc-cli/wasmtime" ]
|
||||
db = [ "service/db" ]
|
||||
cli = [
|
||||
@@ -51,6 +52,7 @@ cli = [
|
||||
"sc-service",
|
||||
"frame-benchmarking-cli",
|
||||
]
|
||||
service-old = [ "service/full-node" ]
|
||||
browser = [
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
@@ -58,5 +60,5 @@ browser = [
|
||||
"service",
|
||||
]
|
||||
runtime-benchmarks = [ "service/runtime-benchmarks" ]
|
||||
service-rewr = [ "service-new/full-node" ]
|
||||
trie-memory-tracker = [ "sp-trie/memory-tracker" ]
|
||||
full-node = [ "service/full-node" ]
|
||||
|
||||
@@ -79,10 +79,6 @@ pub struct RunCmd {
|
||||
#[structopt(long = "force-westend")]
|
||||
pub force_westend: bool,
|
||||
|
||||
/// Force using Rococo native runtime.
|
||||
#[structopt(long = "force-rococo")]
|
||||
pub force_rococo: bool,
|
||||
|
||||
/// Enable the authority discovery module on validator or sentry nodes.
|
||||
///
|
||||
/// When enabled:
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
+10
-3
@@ -26,10 +26,17 @@ mod cli;
|
||||
#[cfg(feature = "cli")]
|
||||
mod command;
|
||||
|
||||
#[cfg(not(feature = "service-rewr"))]
|
||||
pub use service::{
|
||||
self,
|
||||
ProvideRuntimeApi, CoreApi, IdentifyVariant,
|
||||
Block, RuntimeApiCollection, TFullClient
|
||||
ProvideRuntimeApi, CoreApi, ParachainHost, IdentifyVariant,
|
||||
Block, self, RuntimeApiCollection, TFullClient
|
||||
};
|
||||
|
||||
#[cfg(feature = "service-rewr")]
|
||||
pub use service_new::{
|
||||
self as service,
|
||||
ProvideRuntimeApi, CoreApi, ParachainHost, IdentifyVariant,
|
||||
Block, self, RuntimeApiCollection, TFullClient
|
||||
};
|
||||
|
||||
#[cfg(feature = "cli")]
|
||||
|
||||
Reference in New Issue
Block a user