summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-19 02:15:47 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-19 02:15:47 +0000
commit29dfdac923dc0c20ce3f386c868bc4d43f816bf9 (patch)
tree0f75a77a241871d313ba9c919a4a6cef33a06a5d /src/or/routerparse.c
parent90de3ca9aeaddbbad092255f7e599a45ea503f24 (diff)
downloadtor-29dfdac923dc0c20ce3f386c868bc4d43f816bf9.tar.gz
tor-29dfdac923dc0c20ce3f386c868bc4d43f816bf9.zip
r15939@catbus: nickm | 2007-10-18 22:14:15 -0400
Remember the valid-until time of the most recent consensus that listed a router, and (if we are a cache) never delete the routerdesc until that conensus is expired. This is way easier than retaining multiple consensuses. (Of course, the info isn't retained across restarts, but that only affects a few caches at a time.) svn:r12041
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d186af50cf..2b5c298826 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -74,6 +74,7 @@ typedef enum {
K_VOTE_DIGEST,
K_CONSENSUS_DIGEST,
K_CONSENSUS_METHODS,
+ K_CONSENSUS_METHOD,
A_PURPOSE,
_A_UNKNOWN,
@@ -339,7 +340,8 @@ static token_rule_t networkstatus_consensus_token_table[] = {
T1( "known-flags", K_KNOWN_FLAGS, CONCAT_ARGS, NO_OBJ ),
T01("client-versions", K_CLIENT_VERSIONS, CONCAT_ARGS, NO_OBJ ),
- T01("server-versions", K_SERVER_VERSIONS, CONCAT_ARGS, NO_OBJ ),
+ T01("server-versions", K_SERVER_VERSIONS, CONCAT_ARGS, NO_OBJ ),
+ T01("consensus-method", K_CONSENSUS_METHOD, EQ(1), NO_OBJ),
END_OF_TABLE
};