summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-26 14:07:53 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-13 09:29:22 -0400
commit08d2d7c404af9fd836f2fcc35936899a99f813ae (patch)
tree99bc0e83b2be06ad915c40a58884e7d651c66582 /src/or/routerparse.c
parent4b182dfc237ba4457b654a0dbc124f721024dab2 (diff)
downloadtor-08d2d7c404af9fd836f2fcc35936899a99f813ae.tar.gz
tor-08d2d7c404af9fd836f2fcc35936899a99f813ae.zip
prop272: Believe that all routers are Valid and Running.
(We check consensus method when deciding whether to assume a node is valid. No need to check the consensus method for Running, since we will never see a method before 13.) Closes ticket 20001 g
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 03f8f4eded..d7fa17dd9d 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2845,6 +2845,7 @@ routerstatus_parse_entry_from_string(memarea_t *area,
}
}
} else if (tok) {
+ /* This is a consensus, not a vote. */
int i;
for (i=0; i < tok->n_args; ++i) {
if (!strcmp(tok->args[i], "Exit"))
@@ -2875,6 +2876,12 @@ routerstatus_parse_entry_from_string(memarea_t *area,
rs->is_v2_dir = 1;
}
}
+ /* These are implied true by having been included in a consensus made
+ * with a given method */
+ rs->is_flagged_running = 1; /* Starting with consensus method 4. */
+ if (consensus_method >= MIN_METHOD_FOR_EXCLUDING_INVALID_NODES)
+ rs->is_valid = 1;
+
}
if ((tok = find_opt_by_keyword(tokens, K_V))) {
tor_assert(tok->n_args == 1);