diff options
author | Roger Dingledine <arma@torproject.org> | 2008-12-07 23:53:39 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-12-07 23:53:39 +0000 |
commit | f31c16d993f1566d32ae8e1ba2aa29a242818e0c (patch) | |
tree | a855370d7a2d5df2f272f624da6832bece98c56a /src/or/main.c | |
parent | c15b07bb30ca676bdec987ee31ce68f813e684df (diff) | |
download | tor-f31c16d993f1566d32ae8e1ba2aa29a242818e0c.tar.gz tor-f31c16d993f1566d32ae8e1ba2aa29a242818e0c.zip |
Directory mirrors no longer fetch the v1 directory or
running-routers files. They are obsolete, and nobody asks for them
anymore. This is the first step to making v1 authorities obsolete.
svn:r17513
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/or/main.c b/src/or/main.c index 955ae41dd9..d68588db90 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -822,8 +822,6 @@ signewnym_impl(time_t now) static void run_scheduled_events(time_t now) { - static time_t time_to_fetch_directory = 0; - static time_t time_to_fetch_running_routers = 0; static time_t last_rotated_x509_certificate = 0; static time_t time_to_check_v3_certificate = 0; static time_t time_to_check_listeners = 0; @@ -974,33 +972,6 @@ run_scheduled_events(time_t now) time_to_dump_geoip_stats = now + DUMP_GEOIP_STATS_INTERVAL; } - /** 2. Periodically, we consider getting a new directory, getting a - * new running-routers list, and/or force-uploading our descriptor - * (if we've passed our internal checks). */ - if (time_to_fetch_directory < now) { - /* Only caches actually need to fetch v1 directories now. */ - if (directory_fetches_dir_info_early(options) && - !authdir_mode_v1(options) && any_trusted_dir_is_v1_authority() && - !should_delay_dir_fetches(options)) - directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, - ROUTER_PURPOSE_GENERAL, NULL, 1); -/** How often do we (as a cache) fetch a new V1 directory? */ -#define V1_DIR_FETCH_PERIOD (12*60*60) - time_to_fetch_directory = now + V1_DIR_FETCH_PERIOD; - } - - /* Caches need to fetch running_routers; directory clients don't. */ - if (time_to_fetch_running_routers < now) { - if (directory_fetches_dir_info_early(options) && - !authdir_mode_v1(options) && any_trusted_dir_is_v1_authority() && - !should_delay_dir_fetches(options)) - directory_get_from_dirserver(DIR_PURPOSE_FETCH_RUNNING_LIST, - ROUTER_PURPOSE_GENERAL, NULL, 1); -/** How often do we (as a cache) fetch a new V1 runningrouters document? */ -#define V1_RUNNINGROUTERS_FETCH_PERIOD (12*60*60) - time_to_fetch_running_routers = now + V1_RUNNINGROUTERS_FETCH_PERIOD; - } - /* Remove old information from rephist and the rend cache. */ if (time_to_clean_caches < now) { rep_history_clean(now - options->RephistTrackTime); @@ -1010,6 +981,9 @@ run_scheduled_events(time_t now) time_to_clean_caches = now + CLEAN_CACHES_INTERVAL; } + /** 2. Periodically, we consider force-uploading our descriptor + * (if we've passed our internal checks). */ + /** How often do we check whether part of our router info has changed in a way * that would require an upload? */ #define CHECK_DESCRIPTOR_INTERVAL (60) |