summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-12-23 14:25:37 -0500
committerNick Mathewson <nickm@torproject.org>2014-12-23 14:25:37 -0500
commitf9ba0b76cd5b447b86efa87eb115d12d6f0be2e7 (patch)
treebac54f1a900879e11c417bbe759a6c77cfb2cad0 /src/or/routerparse.c
parentd7776315df8ec12a496127a5d5c3c9fcbec9c092 (diff)
parent8a8797f1e45e6124ac93e3a8fb277b5758d7c935 (diff)
downloadtor-f9ba0b76cd5b447b86efa87eb115d12d6f0be2e7.tar.gz
tor-f9ba0b76cd5b447b86efa87eb115d12d6f0be2e7.zip
Merge remote-tracking branch 'teor/bug13718-consensus-interval'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index bc3b00226a..8176d47262 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2598,11 +2598,15 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
(int) tor_parse_long(tok->args[1], 10, 0, INT_MAX, &ok, NULL);
if (!ok)
goto err;
- if (ns->valid_after + MIN_VOTE_INTERVAL > ns->fresh_until) {
+ if (ns->valid_after +
+ (get_options()->TestingTorNetwork ?
+ MIN_VOTE_INTERVAL_TESTING : MIN_VOTE_INTERVAL) > ns->fresh_until) {
log_warn(LD_DIR, "Vote/consensus freshness interval is too short");
goto err;
}
- if (ns->valid_after + MIN_VOTE_INTERVAL*2 > ns->valid_until) {
+ if (ns->valid_after +
+ (get_options()->TestingTorNetwork ?
+ MIN_VOTE_INTERVAL_TESTING : MIN_VOTE_INTERVAL)*2 > ns->valid_until) {
log_warn(LD_DIR, "Vote/consensus liveness interval is too short");
goto err;
}