summaryrefslogtreecommitdiff
path: root/src/or/voting_schedule.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-05-01 11:18:44 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-05-01 11:43:23 -0400
commite504b1b35831e9d18be7b89ab471705b41092606 (patch)
treeacedbc4aa31c84266cfe4f6b98a8b85b95c977f1 /src/or/voting_schedule.c
parent711ff6cdf79c32921f587d389b6ac25630a39d80 (diff)
downloadtor-e504b1b35831e9d18be7b89ab471705b41092606.tar.gz
tor-e504b1b35831e9d18be7b89ab471705b41092606.zip
vote: Namespace functions in voting_schedule.c
Rename them from dirvote_* to voting_schedule_*. No code behavior change. Part of #25988 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/voting_schedule.c')
-rw-r--r--src/or/voting_schedule.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/voting_schedule.c b/src/or/voting_schedule.c
index 9725a32737..88415993cc 100644
--- a/src/or/voting_schedule.c
+++ b/src/or/voting_schedule.c
@@ -15,6 +15,8 @@
#include "config.h"
#include "networkstatus.h"
+#include "dirauth/dirvote.h"
+
/* =====
* Vote scheduling
* ===== */
@@ -25,7 +27,8 @@
* truncated to less than half its size, it is rolled into the
* previous interval. */
time_t
-dirvote_get_start_of_next_interval(time_t now, int interval, int offset)
+voting_schedule_get_start_of_next_interval(time_t now, int interval,
+ int offset)
{
struct tm tm;
time_t midnight_today=0;
@@ -92,9 +95,9 @@ get_voting_schedule(const or_options_t *options, time_t now, int severity)
vote_delay = dist_delay = interval / 4;
start = new_voting_schedule->interval_starts =
- dirvote_get_start_of_next_interval(now,interval,
+ voting_schedule_get_start_of_next_interval(now,interval,
options->TestingV3AuthVotingStartOffset);
- end = dirvote_get_start_of_next_interval(start+1, interval,
+ end = voting_schedule_get_start_of_next_interval(start+1, interval,
options->TestingV3AuthVotingStartOffset);
tor_assert(end > start);
@@ -133,7 +136,7 @@ voting_schedule_t voting_schedule;
/* Using the time <b>now</b>, return the next voting valid-after time. */
time_t
-dirvote_get_next_valid_after_time(void)
+voting_schedule_get_next_valid_after_time(void)
{
/* This is a safe guard in order to make sure that the voting schedule
* static object is at least initialized. Using this function with a zeroed