diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-09 12:41:56 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-16 16:41:53 -0500 |
commit | 441a048a3a135a9405f4fb8463fb60a0f11e42d2 (patch) | |
tree | 3b1074cef54f97ef8303535d574110349aa10969 /src/test/test_dir.c | |
parent | e45810113b150533611c7d9cb5f0f264e00a7394 (diff) | |
download | tor-441a048a3a135a9405f4fb8463fb60a0f11e42d2.tar.gz tor-441a048a3a135a9405f4fb8463fb60a0f11e42d2.zip |
Remove support for now-obsolete consensus methods before 28.
Closes ticket 32695.
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 3a7ba4292e..535c7bb69a 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -7108,7 +7108,7 @@ test_dir_networkstatus_consensus_has_ipv6(void *arg) mock_options->UseMicrodescriptors = 1; mock_networkstatus->consensus_method = - MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS; + MIN_SUPPORTED_CONSENSUS_METHOD; has_ipv6 = networkstatus_consensus_has_ipv6(get_options()); tt_assert(has_ipv6); @@ -7117,24 +7117,19 @@ test_dir_networkstatus_consensus_has_ipv6(void *arg) tt_assert(has_ipv6); mock_networkstatus->consensus_method = - MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS + 1; + MIN_SUPPORTED_CONSENSUS_METHOD + 1; has_ipv6 = networkstatus_consensus_has_ipv6(get_options()); tt_assert(has_ipv6); mock_networkstatus->consensus_method = - MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS + 20; + MIN_SUPPORTED_CONSENSUS_METHOD + 20; has_ipv6 = networkstatus_consensus_has_ipv6(get_options()); tt_assert(has_ipv6); - mock_networkstatus->consensus_method = - MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS - 1; - has_ipv6 = networkstatus_consensus_has_ipv6(get_options()); - tt_assert(!has_ipv6); - /* Test the edge cases */ mock_options->UseMicrodescriptors = 1; mock_networkstatus->consensus_method = - MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS; + MIN_SUPPORTED_CONSENSUS_METHOD; /* Reasonably live */ mock_networkstatus->valid_until = approx_time() - 60; |