aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/microdesc.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-02-14 17:39:34 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2019-02-14 17:39:34 +0200
commit9bfe4ed6dd666bb276e35b6e5c8c3de0c218bce0 (patch)
tree3e7cb22f7289d2bb6c6af0ef3b75506c5af833af /src/feature/nodelist/microdesc.c
parent6efc2a0e1f785e1e12fb8c7fd4b6aa4feceb647a (diff)
parent805f75182a87286a727df323be7c37add595bdff (diff)
downloadtor-9bfe4ed6dd666bb276e35b6e5c8c3de0c218bce0.tar.gz
tor-9bfe4ed6dd666bb276e35b6e5c8c3de0c218bce0.zip
Merge branch 'tor-github/pr/536' into maint-0.3.5
Diffstat (limited to 'src/feature/nodelist/microdesc.c')
-rw-r--r--src/feature/nodelist/microdesc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c
index 3b4a7e1b30..dafaabb5e5 100644
--- a/src/feature/nodelist/microdesc.c
+++ b/src/feature/nodelist/microdesc.c
@@ -108,10 +108,12 @@ microdesc_note_outdated_dirserver(const char *relay_digest)
{
char relay_hexdigest[HEX_DIGEST_LEN+1];
- /* Don't register outdated dirservers if we don't have a live consensus,
- * since we might be trying to fetch microdescriptors that are not even
- * currently active. */
- if (!networkstatus_get_live_consensus(approx_time())) {
+ /* If we have a reasonably live consensus, then most of our dirservers should
+ * still be caching all the microdescriptors in it. Reasonably live
+ * consensuses are up to a day old. But microdescriptors expire 7 days after
+ * the last consensus that referenced them. */
+ if (!networkstatus_get_reasonably_live_consensus(approx_time(),
+ FLAV_MICRODESC)) {
return;
}