mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 15:42:34 +01:00
Retain all routerinfos listed in the consensus.
Previously we'd look at the routerstatus published_on field when deciding what to dump, which really has no point. If something's in the consensus with an ancient published date, then we do want to keep it.
This commit is contained in:
parent
8345b3bd92
commit
db7d067ab1
1 changed files with 0 additions and 2 deletions
|
@ -1924,11 +1924,9 @@ routerlist_remove_old_routers(void)
|
||||||
retain = digestset_new(n_max_retain);
|
retain = digestset_new(n_max_retain);
|
||||||
}
|
}
|
||||||
|
|
||||||
cutoff = now - OLD_ROUTER_DESC_MAX_AGE;
|
|
||||||
/* Retain anything listed in the consensus. */
|
/* Retain anything listed in the consensus. */
|
||||||
if (consensus) {
|
if (consensus) {
|
||||||
SMARTLIST_FOREACH(consensus->routerstatus_list, routerstatus_t *, rs,
|
SMARTLIST_FOREACH(consensus->routerstatus_list, routerstatus_t *, rs,
|
||||||
if (rs->published_on >= cutoff)
|
|
||||||
digestset_add(retain, rs->descriptor_digest));
|
digestset_add(retain, rs->descriptor_digest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue