Dirauth-specific function to get voting interval.

This commit is contained in:
Nick Mathewson 2020-02-24 10:14:59 -05:00
parent d865a50296
commit 7777f1df49
2 changed files with 10 additions and 0 deletions

View 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. */

View 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) */