[tor-bugs] #18873 [Core Tor/Tor]: Refactor circuit_predict_and_launch_new()
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 21 17:32:55 UTC 2016
#18873: Refactor circuit_predict_and_launch_new()
---------------------------+------------------------------------
Reporter: asn | Owner:
Type: defect | Status: merge_ready
Priority: Low | Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: refactoring | Actual Points:
Parent ID: | Points:
Reviewer: dgoulet, teor | Sponsor:
---------------------------+------------------------------------
Comment (by nickm):
Okay, cool; this looks like a straightforward function-extraction
refactoring pattern.
I'd request documentation on the extracted function in the unit tests, and
on the new constants, but that isn't a showstopper, since nothing is
getting _less_ documented in this patch.
The indentation inside the "needs_circuits_for_build(num)" block needs to
get cleaned up. Also, the spacing "needs_circuits_for_build" function
itself violates the K&R C style we use elsewhere.
For 0be9da8b6e016a00e234ad023513f44f7ba76843, instead of removing the
check, I'd prefer to keep it, and add a BUG() wrapper around it.
All of these are pretty trivial; I'll do them when I merge unless somebody
else wants to do them first. (Please use separate commits if you decide
to do them yourself.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18873#comment:23>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list