[tor-bugs] #33784 [Core Tor/sbws]: Think about using `self._relays` in `_relays_with_flag()` and friends

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Apr 1 19:25:51 UTC 2020


#33784: Think about using `self._relays` in `_relays_with_flag()` and friends
-------------------------------+--------------------
     Reporter:  gk             |      Owner:  (none)
         Type:  enhancement    |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/sbws  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+--------------------
 When we currently call `_relays_with_flag()` and friends the `self.relays`
 property might cause a refresh of relays. This works fine in general but
 is a) expensive and b) it causes hangs in unit tests in case one uses the
 property in without `freeze_time()` or even just instantiates a
 `RelayList`.

 We should think whether we can use `self._relays` instead. If not in every
 use case maybe it's possible to use it in some of those cases.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33784>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list