mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 22:58:00 +00:00
committed by
Bastian Köcher
parent
a8ae048a3e
commit
b45d65f330
@@ -119,7 +119,7 @@ pub fn new_partial(
|
||||
}
|
||||
|
||||
/// Builds a new service for a full client.
|
||||
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let sc_service::PartialComponents {
|
||||
client,
|
||||
backend,
|
||||
@@ -132,6 +132,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
other: (block_import, grandpa_link),
|
||||
} = new_partial(&config)?;
|
||||
|
||||
config
|
||||
.network
|
||||
.notifications_protocols
|
||||
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
|
||||
|
||||
let (network, network_status_sinks, system_rpc_tx, network_starter) =
|
||||
sc_service::build_network(sc_service::BuildNetworkParams {
|
||||
config: &config,
|
||||
@@ -325,10 +330,15 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
}
|
||||
|
||||
/// Builds a new service for a light client.
|
||||
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let (client, backend, keystore_container, mut task_manager, on_demand) =
|
||||
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||
|
||||
config
|
||||
.network
|
||||
.notifications_protocols
|
||||
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
|
||||
|
||||
let select_chain = sc_consensus::LongestChain::new(backend.clone());
|
||||
|
||||
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
|
||||
|
||||
@@ -119,7 +119,7 @@ pub fn new_partial(
|
||||
}
|
||||
|
||||
/// Builds a new service for a full client.
|
||||
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let sc_service::PartialComponents {
|
||||
client,
|
||||
backend,
|
||||
@@ -132,6 +132,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
other: (block_import, grandpa_link),
|
||||
} = new_partial(&config)?;
|
||||
|
||||
config
|
||||
.network
|
||||
.notifications_protocols
|
||||
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
|
||||
|
||||
let (network, network_status_sinks, system_rpc_tx, network_starter) =
|
||||
sc_service::build_network(sc_service::BuildNetworkParams {
|
||||
config: &config,
|
||||
@@ -324,10 +329,15 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
}
|
||||
|
||||
/// Builds a new service for a light client.
|
||||
pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let (client, backend, keystore_container, mut task_manager, on_demand) =
|
||||
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||
|
||||
config
|
||||
.network
|
||||
.notifications_protocols
|
||||
.push(sc_finality_grandpa::GRANDPA_PROTOCOL_NAME.into());
|
||||
|
||||
let select_chain = sc_consensus::LongestChain::new(backend.clone());
|
||||
|
||||
let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
|
||||
|
||||
Reference in New Issue
Block a user