Skip to content

Commit b9a0e75

Browse files
authored
Remove more protocols from minimal collator (#1927)
1 parent 5815456 commit b9a0e75

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/relay-chain-minimal-node/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ sc-authority-discovery = { git = "https://github.com/paritytech/substrate", bran
1919
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
2020
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
2121
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
22-
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" }
2322
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" }
24-
sc-network-light = { git = "https://github.com/paritytech/substrate", branch = "master" }
2523
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
2624
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
2725
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }

client/relay-chain-minimal-node/src/network.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ use sc_network_common::{
3232
Metrics, SyncStatus,
3333
},
3434
};
35-
use sc_network_light::light_client_requests;
36-
use sc_network_sync::{block_request_handler, state_request_handler};
3735
use sc_service::{error::Error, Configuration, NetworkStarter, SpawnTaskHandle};
3836
use sp_consensus::BlockOrigin;
3937
use sp_runtime::Justifications;
@@ -60,16 +58,6 @@ pub(crate) fn build_collator_network(
6058
let BuildCollatorNetworkParams { config, client, spawn_handle, genesis_hash } = params;
6159

6260
let protocol_id = config.protocol_id();
63-
64-
let block_request_protocol_config =
65-
block_request_handler::generate_protocol_config(&protocol_id, genesis_hash, None);
66-
67-
let state_request_protocol_config =
68-
state_request_handler::generate_protocol_config(&protocol_id, genesis_hash, None);
69-
70-
let light_client_request_protocol_config =
71-
light_client_requests::generate_protocol_config(&protocol_id, genesis_hash, None);
72-
7361
let chain_sync = DummyChainSync;
7462
let block_announce_config = chain_sync.get_block_announce_proto_config::<Block>(
7563
protocol_id.clone(),
@@ -97,12 +85,7 @@ pub(crate) fn build_collator_network(
9785
metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()),
9886
block_announce_config,
9987
chain_sync_service: Box::new(DummyChainSyncService::<Block>(Default::default())),
100-
request_response_protocol_configs: [
101-
block_request_protocol_config,
102-
state_request_protocol_config,
103-
light_client_request_protocol_config,
104-
]
105-
.to_vec(),
88+
request_response_protocol_configs: Vec::new(),
10689
};
10790

10891
let network_worker = sc_network::NetworkWorker::new(network_params)?;

0 commit comments

Comments
 (0)