pub fn new_partial<RuntimeApi, Executor, BIQ>(
    config: &Configuration,
    build_import_queue: BIQ,
) -> Result<
    PartialComponents<
        TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        TFullBackend<Block>,
        (),
        sc_consensus::DefaultImportQueue<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        sc_transaction_pool::FullPool<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        (
            Option<Telemetry>,
            Option<TelemetryWorkerHandle>,
            Arc<fc_db::Backend<Block>>,
        ),
    >,
    sc_service::Error,
>
where
    RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
        + Send
        + Sync
        + 'static,
    RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
        + sp_api::Metadata<Block>
        + sp_session::SessionKeys<Block>
        + sp_api::ApiExt<
            Block,
            StateBackend = sc_client_api::StateBackendFor<TFullBackend<Block>, Block>,
        > + sp_offchain::OffchainWorkerApi<Block>
        + sp_block_builder::BlockBuilder<Block>
        + fp_rpc::EthereumRuntimeRPCApi<Block>,
    sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
    Executor: sc_executor::NativeExecutionDispatch + 'static,
    BIQ: FnOnce(
        Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
        FrontierBlockImport<
            Block,
            Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        &Configuration,
        Option<TelemetryHandle>,
        &TaskManager,
    ) -> Result<
        sc_consensus::DefaultImportQueue<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        sc_service::Error,
    >,
{
    let telemetry = config
        .telemetry_endpoints
        .clone()
        .filter(|x| !x.is_empty())
        .map(|endpoints| -> Result<_, sc_telemetry::Error> {
            let worker = TelemetryWorker::new(16)?;
            let telemetry = worker.handle().new_telemetry(endpoints);
            Ok((worker, telemetry))
        })
        .transpose()?;

    let executor = sc_executor::NativeElseWasmExecutor::<Executor>::new(
        config.wasm_method,
        config.default_heap_pages,
        config.max_runtime_instances,
        config.runtime_cache_size,
    );

    let (client, backend, keystore_container, task_manager) =
        sc_service::new_full_parts::<Block, RuntimeApi, _>(
            &config,
            telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
            executor,
        )?;
    let client = Arc::new(client);

    let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());

    let telemetry = telemetry.map(|(worker, telemetry)| {
        task_manager
            .spawn_handle()
            .spawn("telemetry", None, worker.run());
        telemetry
    });

    let transaction_pool = sc_transaction_pool::BasicPool::new_full(
        config.transaction_pool.clone(),
        config.role.is_authority().into(),
        config.prometheus_registry(),
        task_manager.spawn_essential_handle(),
        client.clone(),
    );

    let frontier_backend = crate::rpc::open_frontier_backend(config)?;
    let frontier_block_import =
        FrontierBlockImport::new(client.clone(), client.clone(), frontier_backend.clone());

    let import_queue = build_import_queue(
        client.clone(),
        frontier_block_import,
        config,
        telemetry.as_ref().map(|telemetry| telemetry.handle()),
        &task_manager,
    )?;

    let params = PartialComponents {
        backend,
        client,
        import_queue,
        keystore_container,
        task_manager,
        transaction_pool,
        select_chain: (),
        other: (telemetry, telemetry_worker_handle, frontier_backend),
    };

    Ok(params)
}
/// Starts a `ServiceBuilder` for a full service.
///
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
Starts a `ServiceBuilder` for a full service.
Use this macro if you don't actually need the full service, but just the builder in order to
be able to perform chain operations.
Starts a ` ServiceBuilder ` for a full service . Use this macro if you don ' t actually need the full service but just the builder in order to be able to perform chain operations .
pub fn new_partial<RuntimeApi, Executor, BIQ>(
    config: &Configuration,
    build_import_queue: BIQ,
) -> Result<
    PartialComponents<
        TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        TFullBackend<Block>,
        (),
        sc_consensus::DefaultImportQueue<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        sc_transaction_pool::FullPool<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        (
            Option<Telemetry>,
            Option<TelemetryWorkerHandle>,
            Arc<fc_db::Backend<Block>>,
        ),
    >,
    sc_service::Error,
>
where
    RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
        + Send
        + Sync
        + 'static,
    RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
        + sp_api::Metadata<Block>
        + sp_session::SessionKeys<Block>
        + sp_api::ApiExt<
            Block,
            StateBackend = sc_client_api::StateBackendFor<TFullBackend<Block>, Block>,
        > + sp_offchain::OffchainWorkerApi<Block>
        + sp_block_builder::BlockBuilder<Block>
        + fp_rpc::EthereumRuntimeRPCApi<Block>,
    sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
    Executor: sc_executor::NativeExecutionDispatch + 'static,
    BIQ: FnOnce(
        Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
        FrontierBlockImport<
            Block,
            Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        &Configuration,
        Option<TelemetryHandle>,
        &TaskManager,
    ) -> Result<
        sc_consensus::DefaultImportQueue<
            Block,
            TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
        >,
        sc_service::Error,
    >,
{
    let telemetry = config
        .telemetry_endpoints
        .clone()
        .filter(|x| !x.is_empty())
        .map(|endpoints| -> Result<_, sc_telemetry::Error> {
            let worker = TelemetryWorker::new(16)?;
            let telemetry = worker.handle().new_telemetry(endpoints);
            Ok((worker, telemetry))
        })
        .transpose()?;
    let executor = sc_executor::NativeElseWasmExecutor::<Executor>::new(
        config.wasm_method,
        config.default_heap_pages,
        config.max_runtime_instances,
        config.runtime_cache_size,
    );
    let (client, backend, keystore_container, task_manager) =
        sc_service::new_full_parts::<Block, RuntimeApi, _>(
            &config,
            telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
            executor,
        )?;
    let client = Arc::new(client);
    let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());
    let telemetry = telemetry.map(|(worker, telemetry)| {
        task_manager
            .spawn_handle()
            .spawn("telemetry", None, worker.run());
        telemetry
    });
    let transaction_pool = sc_transaction_pool::BasicPool::new_full(
        config.transaction_pool.clone(),
        config.role.is_authority().into(),
        config.prometheus_registry(),
        task_manager.spawn_essential_handle(),
        client.clone(),
    );
    let frontier_backend = crate::rpc::open_frontier_backend(config)?;
    let frontier_block_import =
        FrontierBlockImport::new(client.clone(), client.clone(), frontier_backend.clone());
    let import_queue = build_import_queue(
        client.clone(),
        frontier_block_import,
        config,
        telemetry.as_ref().map(|telemetry| telemetry.handle()),
        &task_manager,
    )?;
    let params = PartialComponents {
        backend,
        client,
        import_queue,
        keystore_container,
        task_manager,
        transaction_pool,
        select_chain: (),
        other: (telemetry, telemetry_worker_handle, frontier_backend),
    };
    Ok(params)
}
pub fn new_partial < RuntimeApi , Executor , BIQ > ( config : & Configuration , build_import_queue : BIQ , ) -> Result < PartialComponents < TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > , TFullBackend < Block > , ( ) , sc_consensus :: DefaultImportQueue < Block , TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > , > , sc_transaction_pool :: FullPool < Block , TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > , > , ( Option < Telemetry > , Option < TelemetryWorkerHandle > , Arc < fc_db :: Backend < Block > > , ) , > , sc_service :: Error , > where RuntimeApi : ConstructRuntimeApi < Block , TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > > + Send + Sync + ' static , RuntimeApi :: RuntimeApi : sp_transaction_pool :: runtime_api :: TaggedTransactionQueue < Block > + sp_api :: Metadata < Block > + sp_session :: SessionKeys < Block > + sp_api :: ApiExt < Block , StateBackend = sc_client_api :: StateBackendFor < TFullBackend < Block > , Block > , > + sp_offchain :: OffchainWorkerApi < Block > + sp_block_builder :: BlockBuilder < Block > + fp_rpc :: EthereumRuntimeRPCApi < Block > , sc_client_api :: StateBackendFor < TFullBackend < Block > , Block > : sp_api :: StateBackend < BlakeTwo256 > , Executor : sc_executor :: NativeExecutionDispatch + ' static , BIQ : FnOnce ( Arc < TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > > , FrontierBlockImport < Block , Arc < TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > > , TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > , > , & Configuration , Option < TelemetryHandle > , & TaskManager , ) -> Result < sc_consensus :: DefaultImportQueue < Block , TFullClient < Block , RuntimeApi , NativeElseWasmExecutor < Executor > > , > , sc_service :: Error , > , { let telemetry = config . telemetry_endpoints . clone ( ) . filter ( | x | ! x . is_empty ( ) ) . map ( | endpoints | -> Result < _ , sc_telemetry :: Error > { let worker = TelemetryWorker :: new ( 16 ) ? ; let telemetry = worker . handle ( ) . new_telemetry ( endpoints ) ; Ok ( ( worker , telemetry ) ) } ) . transpose ( ) ? ; let executor = sc_executor :: NativeElseWasmExecutor :: < Executor > :: new ( config . wasm_method , config . default_heap_pages , config . max_runtime_instances , config . runtime_cache_size , ) ; let ( client , backend , keystore_container , task_manager ) = sc_service :: new_full_parts :: < Block , RuntimeApi , _ > ( & config , telemetry . as_ref ( ) . map ( | ( _ , telemetry ) | telemetry . handle ( ) ) , executor , ) ? ; let client = Arc :: new ( client ) ; let telemetry_worker_handle = telemetry . as_ref ( ) . map ( | ( worker , _ ) | worker . handle ( ) ) ; let telemetry = telemetry . map ( | ( worker , telemetry ) | { task_manager . spawn_handle ( ) . spawn ( " " , None , worker . run ( ) ) ; telemetry } ) ; let transaction_pool = sc_transaction_pool :: BasicPool :: new_full ( config . transaction_pool . clone ( ) , config . role . is_authority ( ) . into ( ) , config . prometheus_registry ( ) , task_manager . spawn_essential_handle ( ) , client . clone ( ) , ) ; let frontier_backend = crate :: rpc :: open_frontier_backend ( config ) ? ; let frontier_block_import = FrontierBlockImport :: new ( client . clone ( ) , client . clone ( ) , frontier_backend . clone ( ) ) ; let import_queue = build_import_queue ( client . clone ( ) , frontier_block_import , config , telemetry . as_ref ( ) . map ( | telemetry | telemetry . handle ( ) ) , & task_manager , ) ? ; let params = PartialComponents { backend , client , import_queue , keystore_container , task_manager , transaction_pool , select_chain : ( ) , other : ( telemetry , telemetry_worker_handle , frontier_backend ) , } ; Ok ( params ) }
Starts a `ServiceBuilder` for a full service.
Starts a ` ServiceBuilder ` for a full service .
config
&Configuration
build_import_queue
BIQ