diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-12-01 11:24:02 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-01 11:24:02 -0500 |
commit | 7e9985b75aa69d4572aac739d44d50056ed20e82 (patch) | |
tree | bcb379522d55a8c0ac64d67bf5620ccd54bd5a32 /src/feature/nodelist/microdesc.c | |
parent | af9dc12fabb664ea100ae12f9c9493ed403cb5c2 (diff) | |
parent | 805f75182a87286a727df323be7c37add595bdff (diff) | |
download | tor-7e9985b75aa69d4572aac739d44d50056ed20e82.tar.gz tor-7e9985b75aa69d4572aac739d44d50056ed20e82.zip |
Merge remote-tracking branch 'tor-github/pr/536'
Diffstat (limited to 'src/feature/nodelist/microdesc.c')
-rw-r--r-- | src/feature/nodelist/microdesc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c index f331d5e109..eadca69548 100644 --- a/src/feature/nodelist/microdesc.c +++ b/src/feature/nodelist/microdesc.c @@ -109,10 +109,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; } |