A directory cache will never purge some old descriptors

By default, caches don't try to download v2 statuses so have_enough_v2 in routerlist_remove_old_routers() is always false. This is similar to legacy/trac#3543 (moved).

I've come up with this modification to check whether we do v2 at all:

+  const or_options_t *options = get_options();
   have_enough_v2 = !caches ||
+    !(authdir_mode_any_main(options) || options->FetchV2Networkstatus) ||
     (networkstatus_v2_list &&
      smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2);

Trac:
Username: fermenthor