summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-01 12:20:39 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-03 08:54:02 -0500
commitc2cee6c780a1329a6906e91dc6f7854635727691 (patch)
tree9f7d41171cfc10872d87f5a40b98fd180cf71399 /src/test
parent98590621bb49cbecd601085f7e03697f8783ff7b (diff)
downloadtor-c2cee6c780a1329a6906e91dc6f7854635727691.tar.gz
tor-c2cee6c780a1329a6906e91dc6f7854635727691.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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test_address_set.c b/src/test/test_address_set.c
index 6d9fab67ab..4e55d71ff4 100644
--- a/src/test/test_address_set.c
+++ b/src/test/test_address_set.c
@@ -210,8 +210,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));
@@ -238,12 +238,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);