diff options
author | Roger Dingledine <arma@torproject.org> | 2016-05-10 11:16:30 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-05-10 11:16:30 -0400 |
commit | 53aaed81dd34f227366b0a0c9b143c4c43a5529e (patch) | |
tree | e1b1097560a0fcbda0215a1231a553824da0dc62 | |
parent | aa6341d4b9159e02825a03f1490ce6b731c2a90e (diff) | |
download | tor-53aaed81dd34f227366b0a0c9b143c4c43a5529e.tar.gz tor-53aaed81dd34f227366b0a0c9b143c4c43a5529e.zip |
get rid of another no-longer-used function
-rw-r--r-- | src/or/networkstatus.c | 34 | ||||
-rw-r--r-- | src/or/networkstatus.h | 1 |
2 files changed, 0 insertions, 35 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 074922bcf0..a9c8037e41 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1288,40 +1288,6 @@ networkstatus_consensus_can_use_extra_fallbacks(const or_options_t *options) > smartlist_len(router_get_trusted_dir_servers()))); } -/* Check if there is more than 1 consensus connection retrieving the usable - * consensus flavor. If so, return 1, if not, return 0. - * - * During normal operation, Tor only makes one consensus download - * connection. But clients can make multiple simultaneous consensus - * connections to improve bootstrap speed and reliability. - * - * If there is more than one connection, we must have connections left - * over from bootstrapping. However, some of the connections may have - * completed and been cleaned up, so it is not sufficient to check the - * return value of this function to see if a client could make multiple - * bootstrap connections. Use - * networkstatus_consensus_can_use_multiple_directories() - * and networkstatus_consensus_is_bootstrapping(). */ -int -networkstatus_consensus_has_excess_connections(void) -{ - const char *usable_resource = networkstatus_get_flavor_name( - usable_consensus_flavor()); - const int consens_conn_usable_count = - connection_dir_count_by_purpose_and_resource( - DIR_PURPOSE_FETCH_CONSENSUS, - usable_resource); - /* The maximum number of connections we want downloading a usable consensus - * Always 1, whether bootstrapping or not. */ - const int max_expected_consens_conn_usable_count = 1; - - if (consens_conn_usable_count > max_expected_consens_conn_usable_count) { - return 1; - } - - return 0; -} - /* Is there a consensus fetch for flavor <b>resource</b> that's far * enough along to be attached to a circuit? */ int diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index 667bc1f062..609fb85bcb 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -75,7 +75,6 @@ int networkstatus_consensus_can_use_multiple_directories( const or_options_t *options); int networkstatus_consensus_can_use_extra_fallbacks( const or_options_t *options); -int networkstatus_consensus_has_excess_connections(void); int networkstatus_consensus_is_already_downloading(const char *resource); #define NSSET_FROM_CACHE 1 |