[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #17000 [metrics-lib]: Allow to distinguish between relay and bridge descriptors



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs