[tor-bugs] #24256 [Metrics/Onionoo]: Add a new "outdated" field to distinguish between outdated and too new tor versions

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Mar 27 11:26:35 UTC 2018


#24256: Add a new "outdated" field to distinguish between outdated and too new tor
versions
-----------------------------+--------------------------------
 Reporter:  arma             |          Owner:  karsten
     Type:  enhancement      |         Status:  needs_revision
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:  #25199           |         Points:
 Reviewer:  iwakeh           |        Sponsor:
-----------------------------+--------------------------------
Changes (by iwakeh):

 * status:  needs_review => needs_revision


Comment:

 While looking again:

 * The comparator interface implemented by TorVersion is not really used as
 such.  Maybe remove the comparator interface and instead introduce two
 methods 'olderThan' and 'youngerThan'?  This would also make
 'determineVersionStatus' easier to read and save the unused 'hashCode' and
 'equals' implementations.
 * Why not return null, if 'TorVersion.of' receives a null argument?
 Currently, it is only used once, where the null check is done before
 calling 'TorVersion.of'.
 * Making enum 'Status' public would also support de/serialization.  The
 abbreviation could also be part of the enum and replace the switch
 statement in NodeStatus to, for example
 `nodeStatus.setVersionStatus(Status.ofAbbreviation(parts[25]).toString())`
 and leave room for any number of new status types.  And, the 'knowledge'
 about abbreviation vs. full description is in one place w/o repetition.

 There are also some checkstyle complaints (mostly empty lines and missing
 javadoc).

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


More information about the tor-bugs mailing list