async fn peer_query_discovery_set(
    peer_id: PeerId,
    req_msg: QueryDiscoverySetRequest,
    outbound_rpc_timeout: Duration,
    mut network_tx: OnchainDiscoveryNetworkSender,
) -> Result<(
    PeerId,
    QueryDiscoverySetRequest,
    Box<QueryDiscoverySetResponse>,
)> {
    let our_latest_version = req_msg.known_version;
    let res_msg = network_tx
        .query_discovery_set(peer_id, req_msg.clone(), outbound_rpc_timeout)
        .await
        .with_context(|| {
            format!(
                "failed to query peer discovery set: peer: {}, latest_version: {}",
                peer_id.short_str(),
                our_latest_version,
            )
        })?;

    Ok((peer_id, req_msg, res_msg))
}
/// Query a remote peer for their latest discovery set and a epoch change
/// proof.
Query a remote peer for their latest discovery set and a epoch change
proof.
Query a remote peer for their latest discovery set and a epoch change proof .
async fn peer_query_discovery_set(
    peer_id: PeerId,
    req_msg: QueryDiscoverySetRequest,
    outbound_rpc_timeout: Duration,
    mut network_tx: OnchainDiscoveryNetworkSender,
) -> Result<(
    PeerId,
    QueryDiscoverySetRequest,
    Box<QueryDiscoverySetResponse>,
)> {
    let our_latest_version = req_msg.known_version;
    let res_msg = network_tx
        .query_discovery_set(peer_id, req_msg.clone(), outbound_rpc_timeout)
        .await
        .with_context(|| {
            format!(
                "failed to query peer discovery set: peer: {}, latest_version: {}",
                peer_id.short_str(),
                our_latest_version,
            )
        })?;
    Ok((peer_id, req_msg, res_msg))
}
async fn peer_query_discovery_set ( peer_id : PeerId , req_msg : QueryDiscoverySetRequest , outbound_rpc_timeout : Duration , mut network_tx : OnchainDiscoveryNetworkSender , ) -> Result < ( PeerId , QueryDiscoverySetRequest , Box < QueryDiscoverySetResponse > , ) > { let our_latest_version = req_msg . known_version ; let res_msg = network_tx . query_discovery_set ( peer_id , req_msg . clone ( ) , outbound_rpc_timeout ) . await . with_context ( | | { format ! ( " " peer_id short_str ( ) our_latest_version ) } ) ? ; Ok ( ( peer_id , req_msg , res_msg ) ) }
Query a remote peer for their latest discovery set and a epoch change
proof.
Query a remote peer for their latest discovery set and a epoch change proof .
peer_id
PeerId
req_msg
QueryDiscoverySetRequest
outbound_rpc_timeout
Duration
network_tx
OnchainDiscoveryNetworkSender
peer_id
PeerId
req_msg
QueryDiscoverySetRequest
outbound_rpc_timeout
Duration
network_tx
OnchainDiscoveryNetworkSender