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>
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.