aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-02-26 08:16:30 -0500
committerGeorge Kadianakis <desnacked@riseup.net>2020-03-03 14:35:01 +0200
commit9a7b10e23fd7e3d1c7e0c8e14ffbea166ef3429a (patch)
tree2965b9aff183c4805dc2a5cede0323be0d2883f8 /src/feature
parentc705c8cf1bf12149543a83fa3bf40023e1385bb9 (diff)
downloadtor-9a7b10e23fd7e3d1c7e0c8e14ffbea166ef3429a.tar.gz
tor-9a7b10e23fd7e3d1c7e0c8e14ffbea166ef3429a.zip
Comment updates from review.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/dirauth/voting_schedule.c5
-rw-r--r--src/feature/hs_common/shared_random_client.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/feature/dirauth/voting_schedule.c b/src/feature/dirauth/voting_schedule.c
index ddb2c4bb07..efc4a0b316 100644
--- a/src/feature/dirauth/voting_schedule.c
+++ b/src/feature/dirauth/voting_schedule.c
@@ -3,9 +3,8 @@
/**
* \file voting_schedule.c
- * \brief This file contains functions that are from the directory authority
- * subsystem related to voting specifically but used by many part of
- * tor. The full feature is built as part of the dirauth module.
+ * \brief Compute information about our voting schedule as a directory
+ * authority.
**/
#include "feature/dirauth/voting_schedule.h"
diff --git a/src/feature/hs_common/shared_random_client.c b/src/feature/hs_common/shared_random_client.c
index 6b291c9344..ece6e101af 100644
--- a/src/feature/hs_common/shared_random_client.c
+++ b/src/feature/hs_common/shared_random_client.c
@@ -233,8 +233,10 @@ sr_state_get_start_time_of_current_protocol_run(void)
time_t beginning_of_curr_round;
/* This function is not used for voting purposes, so if we have a live
- consensus, use its valid-after as the beginning of the current round,
- otherwise resort to the voting schedule which should always exist. */
+ consensus, use its valid-after as the beginning of the current round.
+ If we have no consensus but we're an authority, use our own
+ schedule. Otherwise, we have a bug somewhere, so we fall back to the
+ default voting interval. */
networkstatus_t *ns = networkstatus_get_live_consensus(approx_time());
if (ns) {
beginning_of_curr_round = ns->valid_after;