aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirvote.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/dirvote.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/dirvote.c')
-rw-r--r--src/or/dirvote.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 39505a4f9e..c6068228f9 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1107,8 +1107,12 @@ networkstatus_compute_consensus(smartlist_t *votes,
vote_seconds = median_int(votesec_list, n_votes);
dist_seconds = median_int(distsec_list, n_votes);
- tor_assert(valid_after+MIN_VOTE_INTERVAL <= fresh_until);
- tor_assert(fresh_until+MIN_VOTE_INTERVAL <= valid_until);
+ tor_assert(valid_after +
+ (get_options()->TestingTorNetwork ?
+ MIN_VOTE_INTERVAL_TESTING : MIN_VOTE_INTERVAL) <= fresh_until);
+ tor_assert(fresh_until +
+ (get_options()->TestingTorNetwork ?
+ MIN_VOTE_INTERVAL_TESTING : MIN_VOTE_INTERVAL) <= valid_until);
tor_assert(vote_seconds >= MIN_VOTE_SECONDS);
tor_assert(dist_seconds >= MIN_DIST_SECONDS);