pub(crate) fn select_middle_for_vanguard_circ<'n, R: Rng, T: HasRelayIds + 'n>(
hops: &[T],
netdir: &'n NetDir,
selector: &RelaySelector<'n>,
rng: &mut R,
) -> Result<Relay<'n>>Expand description
Select a middle relay that can be appended to a vanguard circuit.
Used by PathBuilder to build TorPaths of the form
G - L2 - M G - L2 - L3 - M
If full vanguards are enabled, this is also used by HsCircPool,
for extending NAIVE circuits to become GUARDED circuits.