Function zebra_network::peer_set::initialize::crawl

source ยท
async fn crawl<S>(
    candidates: Arc<Mutex<CandidateSet<S>>>,
    demand_tx: Sender<MorePeers>,
    should_always_dial: bool,
) -> Result<(), BoxError>
where S: Service<Request, Response = Response, Error = BoxError> + Send + Sync + 'static, S::Future: Send + 'static,
Expand description

Try to get more peers using candidates, then queue a connection attempt using demand_tx. If there were no new peers and should_always_dial is false, the connection attempt is skipped.