summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_service.c
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-04-11 16:45:21 -0700
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:41:37 -0700
commitcba1ffb43a3ffff133a9dd6b4973e6ce3618daf9 (patch)
treef3fd7d0f82e8a3ccc73b9a22343b1b59ab415f18 /src/feature/hs/hs_service.c
parenta13d7bd5e96765ac7c660415a498d9d9100ade62 (diff)
downloadtor-cba1ffb43a3ffff133a9dd6b4973e6ce3618daf9.tar.gz
tor-cba1ffb43a3ffff133a9dd6b4973e6ce3618daf9.zip
hs_pow: swap out some comments
i think we're done with these? and swap in a nonfatal assert to replace one of the comments. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r--src/feature/hs/hs_service.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index b2af881597..a7e4e40a71 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -2421,7 +2421,6 @@ update_all_descriptors_intro_points(time_t now)
} FOR_EACH_SERVICE_END;
}
-/* XXX: Need to check with mikeperry. */
/** Update or initialise PoW parameters in the descriptors if they do not
* reflect the current state of the PoW defenses. If the defenses have been
* disabled then remove the PoW parameters from the descriptors. */
@@ -2465,9 +2464,9 @@ update_all_descriptors_pow_params(time_t now)
encrypted->pow_params = tor_malloc_zero(sizeof(hs_pow_desc_params_t));
}
- /* Update the descriptor if it doesn't reflect the current pow_state, for
- * example if the defenses have just been enabled or refreshed due to a
- * SIGHUP. HRPR TODO: Don't check using expiration time? */
+ /* Update the descriptor any time the seed rotates, using expiration
+ * time as a proxy for parameters not including the suggested_effort,
+ * which gets special treatment below. */
if (encrypted->pow_params->expiration_time !=
pow_state->expiration_time) {
encrypted->pow_params->type = 0; /* use first version in the list */