aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-16 10:36:13 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-19 13:20:49 -0500
commit897ec8a34cbdfc510ddddd33cc027e13985fde8f (patch)
tree13f3af36b394a57bfdeea6e87bf400c4128d9146 /src/feature/hs
parent9f2e74cac710a50dcc08b3bcaf7c2dc91b4ea949 (diff)
downloadtor-897ec8a34cbdfc510ddddd33cc027e13985fde8f.tar.gz
tor-897ec8a34cbdfc510ddddd33cc027e13985fde8f.zip
hs: Remove v2 stats
We still keep v2 rendezvous stats since we will allow them until the network has entirely phased out. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_service.c2
-rw-r--r--src/feature/hs/hs_stats.c17
-rw-r--r--src/feature/hs/hs_stats.h3
3 files changed, 4 insertions, 18 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 79734a67d5..3e0ecb91e1 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -4075,7 +4075,7 @@ hs_service_receive_introduce2(origin_circuit_t *circ, const uint8_t *payload,
if (circ->hs_ident) {
ret = service_handle_introduce2(circ, payload, payload_len);
- hs_stats_note_introduce2_cell(1);
+ hs_stats_note_introduce2_cell();
}
done:
diff --git a/src/feature/hs/hs_stats.c b/src/feature/hs/hs_stats.c
index f9d458d630..c292694294 100644
--- a/src/feature/hs/hs_stats.c
+++ b/src/feature/hs/hs_stats.c
@@ -12,20 +12,14 @@
/** Number of v3 INTRODUCE2 cells received */
static uint32_t n_introduce2_v3 = 0;
-/** Number of v2 INTRODUCE2 cells received */
-static uint32_t n_introduce2_v2 = 0;
/** Number of attempts to make a circuit to a rendezvous point */
static uint32_t n_rendezvous_launches = 0;
/** Note that we received another INTRODUCE2 cell. */
void
-hs_stats_note_introduce2_cell(int is_hsv3)
+hs_stats_note_introduce2_cell(void)
{
- if (is_hsv3) {
- n_introduce2_v3++;
- } else {
- n_introduce2_v2++;
- }
+ n_introduce2_v3++;
}
/** Return the number of v3 INTRODUCE2 cells we have received. */
@@ -35,13 +29,6 @@ hs_stats_get_n_introduce2_v3_cells(void)
return n_introduce2_v3;
}
-/** Return the number of v2 INTRODUCE2 cells we have received. */
-uint32_t
-hs_stats_get_n_introduce2_v2_cells(void)
-{
- return n_introduce2_v2;
-}
-
/** Note that we attempted to launch another circuit to a rendezvous point. */
void
hs_stats_note_service_rendezvous_launch(void)
diff --git a/src/feature/hs/hs_stats.h b/src/feature/hs/hs_stats.h
index aea2ccf5c2..b08e2f702d 100644
--- a/src/feature/hs/hs_stats.h
+++ b/src/feature/hs/hs_stats.h
@@ -9,9 +9,8 @@
#ifndef TOR_HS_STATS_H
#define TOR_HS_STATS_H
-void hs_stats_note_introduce2_cell(int is_hsv3);
+void hs_stats_note_introduce2_cell(void);
uint32_t hs_stats_get_n_introduce2_v3_cells(void);
-uint32_t hs_stats_get_n_introduce2_v2_cells(void);
void hs_stats_note_service_rendezvous_launch(void);
uint32_t hs_stats_get_n_rendezvous_launches(void);