]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Dirauth-specific function to get voting interval.
authorNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2020 15:14:59 +0000 (10:14 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2020 15:55:06 +0000 (10:55 -0500)
src/feature/dirauth/voting_schedule.c
src/feature/dirauth/voting_schedule.h

index 25714c00c081086ece9e6d1ecee10ad90af0a339..5e076a0ef5ca633c7010b8dc13fb88f694fda1cd 100644 (file)
@@ -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. */
index 0b2ce0f12a9653a6f511a73f6c3f11b0ec960e3d..b5dc811bfc198c0eae8a380d00deb74b78b6471d 100644 (file)
@@ -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) */