Skip to content

Commit

Permalink
[substrate-apply] humanode-peer:service: Prepare sc-network for Proto…
Browse files Browse the repository at this point in the history
…colController/NotificationService #14080
  • Loading branch information
dmitrylavrenov committed Oct 28, 2024
1 parent 58b1060 commit 772ced8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/humanode-peer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ sc-consensus = { workspace = true }
sc-consensus-babe = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-executor = { workspace = true }
sc-network = { workspace = true }
sc-service = { workspace = true }
sc-telemetry = { workspace = true }
sc-transaction-pool = { workspace = true }
Expand Down
13 changes: 6 additions & 7 deletions crates/humanode-peer/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
),
} = new_partial(&config)?;
let Configuration {
substrate: mut config,
substrate: config,
bioauth_flow: bioauth_flow_config,
ethereum_rpc: ethereum_rpc_config,
..
Expand All @@ -245,12 +245,10 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
&config.chain_spec,
);

config
.network
.extra_sets
.push(sc_consensus_grandpa::grandpa_peers_set_config(
grandpa_protocol_name.clone(),
));
let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network);
net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config(
grandpa_protocol_name.clone(),
));

let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
Arc::clone(&backend),
Expand Down Expand Up @@ -297,6 +295,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &config,
net_config,
client: Arc::clone(&client),
transaction_pool: Arc::clone(&transaction_pool),
spawn_handle: task_manager.spawn_handle(),
Expand Down

0 comments on commit 772ced8

Please sign in to comment.