Remove functions that checked for pre-ipv6 consensus.

We no longer need or need to test:
  * node_awaiting_ipv6()
  * networkstatus_consensus_has_ipv6().
This commit is contained in:
Nick Mathewson
2020-01-15 11:26:14 -05:00
parent 8d94bcbf8c
commit ceacda44f1
4 changed files with 1 additions and 166 deletions
-22
View File
@@ -1577,28 +1577,6 @@ networkstatus_consensus_is_already_downloading(const char *resource)
return answer;
}
/* Does the current, reasonably live consensus have IPv6 addresses?
* Returns 1 if there is a reasonably live consensus and its consensus method
* includes IPv6 addresses in the consensus.
* Otherwise, if there is no consensus, or the method does not include IPv6
* addresses, returns 0. */
int
networkstatus_consensus_has_ipv6(const or_options_t* options)
{
(void) options;
const networkstatus_t *cons = networkstatus_get_reasonably_live_consensus(
approx_time(),
usable_consensus_flavor());
/* If we have no consensus, we have no IPv6 in it */
if (!cons) {
return 0;
}
/* All supported consensus methods have IPv6 addresses. */
return 1;
}
/** Given two router status entries for the same router identity, return 1 if
* if the contents have changed between them. Otherwise, return 0. */
static int
-1
View File
@@ -104,7 +104,6 @@ int networkstatus_consensus_can_use_multiple_directories(
MOCK_DECL(int, networkstatus_consensus_can_use_extra_fallbacks,(
const or_options_t *options));
int networkstatus_consensus_is_already_downloading(const char *resource);
int networkstatus_consensus_has_ipv6(const or_options_t* options);
#define NSSET_FROM_CACHE 1
#define NSSET_WAS_WAITING_FOR_CERTS 2