fn immediate_probe_stream<U>(
me: OffchainPublicKey,
cfg: ProberConfig,
graph: U,
) -> impl Stream<Item = ProbeRouting>where
U: NetworkGraphView<NodeId = OffchainPublicKey, Observed = Observations> + Clone + Send + Sync + 'static,Expand description
Stream of neighbor probes emitted in bursts per tick.
Each tick emits the entire cached batch. The cache is recomputed when it is
empty (all probes drained) or when cfg.shuffle_ttl has expired, whichever
comes first. This avoids re-traversing the graph every tick while still
emitting all peers in each burst.
When cfg.probe_connected_only is true, only peers with a
Connected(true) edge from me are included. This assumes that a
background discovery mechanism (e.g. libp2p identify/kademlia) has
already established connections and recorded them in the graph.