mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
remove unused code (#2058)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user