[tor-bugs] #17000 [metrics-lib]: Allow to distinguish between relay and bridge descriptors
    Tor Bug Tracker & Wiki 
    blackhole at torproject.org
       
    Wed Sep  9 16:00:07 UTC 2015
    
    
  
#17000: Allow to distinguish between relay and bridge descriptors
-----------------------------+--------------------------
     Reporter:  karsten      |      Owner:  karsten
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:
    Component:  metrics-lib  |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------
Comment (by atagar):
 Hi Karsten, in general looks good! I was a little surprised at some of the
 code duplication. The parseDescriptors() of RelayExtraInfoDescriptorImpl
 verses BridgeExtraInfoDescriptorImpl are identical except for the
 instances it returns. Seems like something you might be able to use
 newInstance() for, but just a guess. Been a few years since I seriously
 touched java. ;)
 That aside, the bridge and non-bridge classes don't really differ. I
 assume that means if you give a bridge annotation to a normal descriptor
 metrics-lib will happily parse it, and vice versa? For Stem the bridge and
 non-bridge classes differ, with a parent for the common bits...
 *
 [https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n413
 Common server descriptor parent]
 *
 [https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n670
 Non-bridge server descriptors]
 *
 [https://gitweb.torproject.org/stem.git/tree/stem/descriptor/server_descriptor.py#n774
 Bridge server descriptors]
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17000#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
    
    
More information about the tor-bugs
mailing list