mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Various small improvements to service construction. (#6738)
* Remove service components and add build_network, build_offchain_workers etc * Improve transaction pool api * Remove commented out line * Add PartialComponents * Add BuildNetworkParams, documentation * Remove unused imports in tests * Apply suggestions from code review Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Remove unused imports in node-bench Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -20,8 +20,8 @@ use crate::{chain_spec, service, Cli, Subcommand};
|
||||
use node_executor::Executor;
|
||||
use node_runtime::{Block, RuntimeApi};
|
||||
use sc_cli::{Result, SubstrateCli, RuntimeVersion, Role, ChainSpec};
|
||||
use sc_service::ServiceParams;
|
||||
use crate::service::new_full_params;
|
||||
use sc_service::PartialComponents;
|
||||
use crate::service::new_partial;
|
||||
|
||||
impl SubstrateCli for Cli {
|
||||
fn impl_name() -> String {
|
||||
@@ -96,8 +96,8 @@ pub fn run() -> Result<()> {
|
||||
Some(Subcommand::Base(subcommand)) => {
|
||||
let runner = cli.create_runner(subcommand)?;
|
||||
runner.run_subcommand(subcommand, |config| {
|
||||
let (ServiceParams { client, backend, import_queue, task_manager, .. }, ..)
|
||||
= new_full_params(config)?;
|
||||
let PartialComponents { client, backend, task_manager, import_queue, ..}
|
||||
= new_partial(&config)?;
|
||||
Ok((client, backend, import_queue, task_manager))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user