diff options
author | Nick Mathewson <nickm@torproject.org> | 2024-03-06 19:33:07 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2024-03-12 09:43:14 -0400 |
commit | 094b5f0afec95c8379da3b6e4e2a84326f4092ea (patch) | |
tree | cc8f5463ff77d2bc764000f3835dc296124d51c5 | |
parent | a9d72a96241fae997f78cac4000c327ac30d226a (diff) | |
download | arti-094b5f0afec95c8379da3b6e4e2a84326f4092ea.tar.gz arti-094b5f0afec95c8379da3b6e4e2a84326f4092ea.zip |
guardmgr: explain remaining work for #504 issues.
-rw-r--r-- | crates/tor-guardmgr/src/sample/candidate.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/tor-guardmgr/src/sample/candidate.rs b/crates/tor-guardmgr/src/sample/candidate.rs index c512ee1cb..813ebca1e 100644 --- a/crates/tor-guardmgr/src/sample/candidate.rs +++ b/crates/tor-guardmgr/src/sample/candidate.rs @@ -107,7 +107,8 @@ impl Universe for NetDir { } fn status<T: ChanTarget>(&self, guard: &T) -> CandidateStatus<Candidate> { - // TODO #504 + // TODO #504 - if we make a data extractor for Relays, we'll want + // to use it here. match NetDir::by_ids(self, guard) { Some(relay) => CandidateStatus::Present(Candidate { listed_as_guard: relay.is_suitable_as_guard(), @@ -131,7 +132,8 @@ impl Universe for NetDir { // When adding from a netdir, we impose a limit on the fraction of the // universe we're willing to add. let maximum_weight = { - // TODO #504 + // TODO #504 - to convert this, we need tor_relay_selector to apply + // to UncheckedRelay. let total_weight = self.total_weight(tor_netdir::WeightRole::Guard, |r| { r.is_suitable_as_guard() && r.is_dir_cache() }); |