Unverified Commit 550d84a8 authored by Andronik Ordian's avatar Andronik Ordian Committed by GitHub
Browse files

remove unused code (#2058)

parent cab6c7b7
Pipeline #115807 passed with stages
in 25 minutes and 26 seconds
......@@ -691,7 +691,7 @@ pub(crate) async fn run(
loop {
select! {
res = state.connection_requests.next().fuse() => {
res = state.connection_requests.next() => {
let (relay_parent, validator_id, peer_id) = match res {
Some(res) => res,
// 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)))
.collect::<HashMap<AuthorityDiscoveryId, ValidatorId>>();
let connections = connect_to_authorities(ctx, authorities).await?;
let connections = connect_to_authorities(ctx, authorities).await;
Ok(ConnectionRequest {
validator_map,
......@@ -98,7 +98,7 @@ pub async fn connect_to_past_session_validators<Context: SubsystemContext>(
async fn connect_to_authorities<Context: SubsystemContext>(
ctx: &mut Context,
validator_ids: Vec<AuthorityDiscoveryId>,
) -> Result<mpsc::Receiver<(AuthorityDiscoveryId, PeerId)>, Error> {
) -> mpsc::Receiver<(AuthorityDiscoveryId, PeerId)> {
const PEERS_CAPACITY: usize = 8;
let (connected, connected_rx) = mpsc::channel(PEERS_CAPACITY);
......@@ -110,7 +110,7 @@ async fn connect_to_authorities<Context: SubsystemContext>(
}
)).await;
Ok(connected_rx)
connected_rx
}
/// A struct that assists performing multiple concurrent connection requests.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment