What conditions should be applied to candidate IPTs
We pick a relay to be an IPT using this code:
let relay = netdir
.pick_relay(
&mut rng,
tor_netdir::WeightRole::HsIntro,
// TODO HSS should we apply any other conditions to the selected IPT?
|new| {
new.is_hs_intro_point()
&& !self
.irelays
.iter()
.any(|existing| new.has_any_relay_id_from(&existing.relay))
},
)
.ok_or(ChooseIptError::TooFewUsableRelays)?;
Maybe this is right. But maybe it isn't. We should decide (and possibly downgrade this ticket or move it to the Security milestone).