Add a temporary HasAddrs for BridgeRelay

See comment for an explanation of the next issue here.
This commit is contained in:
Nick Mathewson 2022-10-04 17:53:40 -04:00
parent 23b3b0553f
commit fac975ddfb
1 changed files with 10 additions and 1 deletions

View File

@ -67,7 +67,16 @@ impl<'a> HasRelayIds for BridgeRelayWithDesc<'a> {
}
impl<'a> HasAddrs for BridgeRelayWithDesc<'a> {
fn addrs(&self) -> &[std::net::SocketAddr] {
self.0.addrs()
// TODO pt-client: This is a tricky case and we'll need to audit the
// semantics of HasAddrs.
//
// The problem is that the addresses this method returns can be _either_
// addresses at which the relay resides, and which we use to detect
// familyhood (in which case we should return any addresses from the
// members of this object), _or_ they can be addresses which we should
// try to contact directly to perform the Tor handshake, in which case
// this method should return an empty list.
&[]
}
}
impl<'a> ChanTarget for BridgeRelayWithDesc<'a> {}