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