remove unused code (#2058)

This commit is contained in:
Andronik Ordian
2020-12-02 15:18:18 +01:00
committed by GitHub
parent 890ae589d4
commit 87e0b6fe65
2 changed files with 4 additions and 4 deletions
@@ -691,7 +691,7 @@ pub(crate) async fn run(
loop { loop {
select! { select! {
res = state.connection_requests.next().fuse() => { res = state.connection_requests.next() => {
let (relay_parent, validator_id, peer_id) = match res { let (relay_parent, validator_id, peer_id) = match res {
Some(res) => res, Some(res) => res,
// Will never happen, but better to be safe. // Will never happen, but better to be safe.
@@ -87,7 +87,7 @@ pub async fn connect_to_past_session_validators<Context: SubsystemContext>(
.filter_map(|(k, v)| v.map(|v| (v, k))) .filter_map(|(k, v)| v.map(|v| (v, k)))
.collect::<HashMap<AuthorityDiscoveryId, ValidatorId>>(); .collect::<HashMap<AuthorityDiscoveryId, ValidatorId>>();
let connections = connect_to_authorities(ctx, authorities).await?; let connections = connect_to_authorities(ctx, authorities).await;
Ok(ConnectionRequest { Ok(ConnectionRequest {
validator_map, validator_map,
@@ -98,7 +98,7 @@ pub async fn connect_to_past_session_validators<Context: SubsystemContext>(
async fn connect_to_authorities<Context: SubsystemContext>( async fn connect_to_authorities<Context: SubsystemContext>(
ctx: &mut Context, ctx: &mut Context,
validator_ids: Vec<AuthorityDiscoveryId>, validator_ids: Vec<AuthorityDiscoveryId>,
) -> Result<mpsc::Receiver<(AuthorityDiscoveryId, PeerId)>, Error> { ) -> mpsc::Receiver<(AuthorityDiscoveryId, PeerId)> {
const PEERS_CAPACITY: usize = 8; const PEERS_CAPACITY: usize = 8;
let (connected, connected_rx) = mpsc::channel(PEERS_CAPACITY); let (connected, connected_rx) = mpsc::channel(PEERS_CAPACITY);
@@ -110,7 +110,7 @@ async fn connect_to_authorities<Context: SubsystemContext>(
} }
)).await; )).await;
Ok(connected_rx) connected_rx
} }
/// A struct that assists performing multiple concurrent connection requests. /// A struct that assists performing multiple concurrent connection requests.