diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-01 12:20:39 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-01 12:22:23 -0500 |
commit | bd4a3f64a1f6802c97a7976ff9f80495ef3ba57d (patch) | |
tree | 2aa9c3e0111d06dc8562387d087a9eb920bfc662 /src/test | |
parent | 838e07be9dc88d41da39a1b4b6b445f67309b108 (diff) | |
download | tor-bd4a3f64a1f6802c97a7976ff9f80495ef3ba57d.tar.gz tor-bd4a3f64a1f6802c97a7976ff9f80495ef3ba57d.zip |
node: Move reentry set to use a digestmap_t
Any lookup now will be certain and not probabilistic as the bloomfilter.
Closes #40269
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_address_set.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test_address_set.c b/src/test/test_address_set.c index 55a0b106d2..a73fbab76a 100644 --- a/src/test/test_address_set.c +++ b/src/test/test_address_set.c @@ -215,8 +215,8 @@ test_exit_no_reentry(void *arg) nodelist_set_consensus(dummy_ns); /* The address set is empty. Try it anyway */ - tt_assert(!nodelist_reentry_probably_contains(&addr_v4, 244)); - tt_assert(!nodelist_reentry_probably_contains(&addr_v6, 244)); + tt_assert(!nodelist_reentry_contains(&addr_v4, 244)); + tt_assert(!nodelist_reentry_contains(&addr_v6, 244)); /* Now let's populate the network */ md = tor_malloc_zero(sizeof(*md)); @@ -243,12 +243,12 @@ test_exit_no_reentry(void *arg) /* First let's try an address that is on the no-reentry list, but with a different port */ - tt_assert(!nodelist_reentry_probably_contains(&addr_v4, 666)); - tt_assert(!nodelist_reentry_probably_contains(&addr_v6, 444)); + tt_assert(!nodelist_reentry_contains(&addr_v4, 666)); + tt_assert(!nodelist_reentry_contains(&addr_v6, 444)); /* OK now let's try with the right address and right port */ - tt_assert(nodelist_reentry_probably_contains(&addr_v4, 444)); - tt_assert(nodelist_reentry_probably_contains(&addr_v6, 666)); + tt_assert(nodelist_reentry_contains(&addr_v4, 444)); + tt_assert(nodelist_reentry_contains(&addr_v6, 666)); done: routerstatus_free(rs); routerinfo_free(ri); microdesc_free(md); |