summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-25 15:27:06 -0400
committerNick Mathewson <nickm@torproject.org>2011-03-25 16:28:37 -0400
commit444e46d96d05c3e12eca02769512c74f2eb16b48 (patch)
tree8022be33173ebd198e25c00dd90eae88ca3f9778 /src/or/networkstatus.c
parentfe86be61b6d84fbb442b13aa52139e6a3892dac0 (diff)
downloadtor-444e46d96d05c3e12eca02769512c74f2eb16b48.tar.gz
tor-444e46d96d05c3e12eca02769512c74f2eb16b48.zip
Remove the "fuzzy time" code
It was the start of a neat idea, but it only got used in 3 places, none of which really needed it.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 687ac03fa0..155dffe630 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1764,7 +1764,11 @@ networkstatus_set_current_consensus(const char *consensus,
write_str_to_file(consensus_fname, consensus, 0);
}
- if (ftime_definitely_before(now, current_consensus->valid_after)) {
+/** If a consensus appears more than this many seconds before its declared
+ * valid-after time, declare that our clock is skewed. */
+#define EARLY_CONSENSUS_NOTICE_SKEW 60
+
+ if (now < current_consensus->valid_after - EARLY_CONSENSUS_NOTICE_SKEW) {
char tbuf[ISO_TIME_LEN+1];
char dbuf[64];
long delta = now - current_consensus->valid_after;