diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-09 15:07:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-22 20:00:47 -0400 |
commit | 5f90d28c01960921ad1cd680ba7e1275a44345c0 (patch) | |
tree | 08e99390bd1cc016b47d6fa4ab01a763abf18f56 /src/test/test_dir.c | |
parent | 73c9c16faab299b483716c1b8e76c433282d3d50 (diff) | |
download | tor-5f90d28c01960921ad1cd680ba7e1275a44345c0.tar.gz tor-5f90d28c01960921ad1cd680ba7e1275a44345c0.zip |
Remove MIN_METHOD_FOR_{SHARED_RANDOM,EXCLUDING_INVALID_NODES}
Also remove client detection for pre-EXCLUDING_INVALID_NODES
consensuses, and a test for that detection.
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index e5355069a3..df5ae2d594 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -5617,9 +5617,8 @@ test_dir_assumed_flags(void *arg) memarea_t *area = memarea_new(); routerstatus_t *rs = NULL; - /* First, we should always assume that the Running flag is set, even - * when it isn't listed, since the consensus method is always - * higher than 4. */ + /* We can assume that consensus method is higher than 24, so Running and + * Valid are always implicitly set */ const char *str1 = "r example hereiswhereyouridentitygoes 2015-08-30 12:00:00 " "192.168.0.1 9001 0\n" @@ -5628,17 +5627,6 @@ test_dir_assumed_flags(void *arg) const char *cp = str1; rs = routerstatus_parse_entry_from_string(area, &cp, tokens, NULL, NULL, - 23, FLAV_MICRODESC); - tt_assert(rs); - tt_assert(rs->is_flagged_running); - tt_assert(! rs->is_valid); - tt_assert(! rs->is_exit); - tt_assert(rs->is_fast); - routerstatus_free(rs); - - /* With method 24 or later, we can assume "valid" is set. */ - cp = str1; - rs = routerstatus_parse_entry_from_string(area, &cp, tokens, NULL, NULL, 24, FLAV_MICRODESC); tt_assert(rs); tt_assert(rs->is_flagged_running); |