Always look at the subprotocol versions summary flags

Previously, we wouldn't do this when running with a routerinfo_t in
some cases, leading to many needless calls to the protover module.

This change also cleans up the code in nodelist.c a bit.

Fixes bug 25008; bugfix on 0.2.9.4-alpha.
This commit is contained in:
Nick Mathewson
2018-01-24 13:52:51 -05:00
parent 92496a739a
commit 7e504515b3
2 changed files with 43 additions and 63 deletions
+9
View File
@@ -0,0 +1,9 @@
o Minor bugfixes (performance):
- Avoid calling protocol_list_supports_protocol() from inside tight loops
when running with cached routerinfo_t objects. Instead,
summarize the relevant protocols as flags in the routerinfo_t, as we do
for routerstatus_t objects. This change simplifies our code a little,
and saves a large amount of short-term memory allocation operations.
Fixes bug 25008; bugfix on 0.2.9.4-alpha.