aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-02-24 10:14:59 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-24 10:55:06 -0500
commit7777f1df495c0f6f778a4d2378d5ddb89f985bda (patch)
tree5205bcdfb1b1f820e404819df825be82bd899ffb
parentd865a50296de2dc3114946e2effcae9f8a781dcb (diff)
downloadtor-7777f1df495c0f6f778a4d2378d5ddb89f985bda.tar.gz
tor-7777f1df495c0f6f778a4d2378d5ddb89f985bda.zip
Dirauth-specific function to get voting interval.
-rw-r--r--src/feature/dirauth/voting_schedule.c9
-rw-r--r--src/feature/dirauth/voting_schedule.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/dirauth/voting_schedule.c b/src/feature/dirauth/voting_schedule.c
index 25714c00c0..5e076a0ef5 100644
--- a/src/feature/dirauth/voting_schedule.c
+++ b/src/feature/dirauth/voting_schedule.c
@@ -143,6 +143,15 @@ dirauth_sched_get_next_valid_after_time(void)
return dirauth_get_voting_schedule()->interval_starts;
}
+/** Return the voting interval that we are configured to use.
+ *
+ * Dirauth only. */
+int
+dirauth_sched_get_configured_interval(void)
+{
+ return get_options()->V3AuthVotingInterval;
+}
+
/** Set voting_schedule to hold the timing for the next vote we should be
* doing. All type of tor do that because HS subsystem needs the timing as
* well to function properly. */
diff --git a/src/feature/dirauth/voting_schedule.h b/src/feature/dirauth/voting_schedule.h
index 0b2ce0f12a..b5dc811bfc 100644
--- a/src/feature/dirauth/voting_schedule.h
+++ b/src/feature/dirauth/voting_schedule.h
@@ -57,5 +57,6 @@ void dirauth_sched_recalculate_timing(const or_options_t *options,
time_t now);
time_t dirauth_sched_get_next_valid_after_time(void);
+int dirauth_sched_get_configured_interval(void);
#endif /* !defined(TOR_VOTING_SCHEDULE_H) */