diff --git a/crates/tor-circmgr/src/path/exitpath.rs b/crates/tor-circmgr/src/path/exitpath.rs index bc5c49822..a34f6961b 100644 --- a/crates/tor-circmgr/src/path/exitpath.rs +++ b/crates/tor-circmgr/src/path/exitpath.rs @@ -182,6 +182,7 @@ impl<'a> ExitPathBuilder<'a> { } let guard_usage = b.build().expect("Failed while building guard usage!"); let (guard, mut mon, usable) = guardmgr.select_guard(guard_usage, Some(netdir))?; + // TODO pt-client: First try as_circ_target; then try get_relay. let guard = guard.get_relay(netdir).ok_or_else(|| { internal!( "Somehow the guardmgr gave us an unlisted guard {:?}!", diff --git a/crates/tor-guardmgr/src/lib.rs b/crates/tor-guardmgr/src/lib.rs index 3447a7c91..0cc13d880 100644 --- a/crates/tor-guardmgr/src/lib.rs +++ b/crates/tor-guardmgr/src/lib.rs @@ -1345,8 +1345,18 @@ impl FirstHop { } /// Look up this guard in `netdir`. pub fn get_relay<'a>(&self, netdir: &'a NetDir) -> Option> { + // TODO pt-client: This should always return "None" for a bridge. self.id().get_relay(netdir) } + + /// If possible, return a view of this object that can be used to build a circuit. + /// + /// TODO pt-client: This will need to return "Some" only for bridges that have + /// a bridge descriptor. + #[allow(clippy::missing_panics_doc)] + pub fn as_circ_target(&self) -> Option { + todo!() // TODO pt-client: Implement + } } // This is somewhat redundant with the implementations in crate::guard::Guard.