aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_stats.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-11-03 17:34:46 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2020-11-03 19:14:57 +0200
commit9a98d1da30a25b1f263859cae21a3c0863d8c91d (patch)
tree364d72a9161b842bc5bf8e818c74fc82a3d3752e /src/test/test_stats.c
parentf2da7b05b0a8e6d353b94ea496f0ce99aa076ffa (diff)
downloadtor-9a98d1da30a25b1f263859cae21a3c0863d8c91d.tar.gz
tor-9a98d1da30a25b1f263859cae21a3c0863d8c91d.zip
Switch v3_onions_seen_this_period to digest256map_t.
Diffstat (limited to 'src/test/test_stats.c')
-rw-r--r--src/test/test_stats.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/test/test_stats.c b/src/test/test_stats.c
index dc02c9e784..64d89cf1e9 100644
--- a/src/test/test_stats.c
+++ b/src/test/test_stats.c
@@ -528,7 +528,8 @@ test_rephist_v3_onions(void *arg)
/* HS stats should be zero here */
hs_v3_stats = rep_hist_get_hs_v3_stats();
- tt_int_op(digestmap_size(hs_v3_stats->v3_onions_seen_this_period), OP_EQ, 0);
+ tt_int_op(digest256map_size(hs_v3_stats->v3_onions_seen_this_period),
+ OP_EQ, 0);
/* Generate a valid descriptor */
ret = ed25519_keypair_generate(&signing_kp1, 0);
@@ -542,7 +543,8 @@ test_rephist_v3_onions(void *arg)
ret = hs_cache_store_as_dir(desc1_str);
tt_int_op(ret, OP_EQ, 0);
hs_v3_stats = rep_hist_get_hs_v3_stats();
- tt_int_op(digestmap_size(hs_v3_stats->v3_onions_seen_this_period), OP_EQ, 1);
+ tt_int_op(digest256map_size(hs_v3_stats->v3_onions_seen_this_period),
+ OP_EQ, 1);
/* cleanup */
hs_descriptor_free(desc1);
@@ -560,7 +562,8 @@ test_rephist_v3_onions(void *arg)
ret = hs_cache_store_as_dir(desc1_str);
tt_int_op(ret, OP_EQ, 0);
hs_v3_stats = rep_hist_get_hs_v3_stats();
- tt_int_op(digestmap_size(hs_v3_stats->v3_onions_seen_this_period), OP_EQ, 2);
+ tt_int_op(digest256map_size(hs_v3_stats->v3_onions_seen_this_period),
+ OP_EQ, 2);
/* Check that storing the same descriptor twice does not work */
ret = hs_cache_store_as_dir(desc1_str);
@@ -580,7 +583,8 @@ test_rephist_v3_onions(void *arg)
/* Store descriptor and check that stats are updated */
ret = hs_cache_store_as_dir(desc1_str);
tt_int_op(ret, OP_EQ, 0);
- tt_int_op(digestmap_size(hs_v3_stats->v3_onions_seen_this_period), OP_EQ, 2);
+ tt_int_op(digest256map_size(hs_v3_stats->v3_onions_seen_this_period),
+ OP_EQ, 2);
/* cleanup */
hs_descriptor_free(desc1);
@@ -600,7 +604,8 @@ test_rephist_v3_onions(void *arg)
/* Store descriptor and check that stats are updated */
ret = hs_cache_store_as_dir(desc1_str);
tt_int_op(ret, OP_EQ, 0);
- tt_int_op(digestmap_size(hs_v3_stats->v3_onions_seen_this_period), OP_EQ, 3);
+ tt_int_op(digest256map_size(hs_v3_stats->v3_onions_seen_this_period),
+ OP_EQ, 3);
/* cleanup */
hs_descriptor_free(desc1);