aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_service.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-05-01 11:25:25 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-05-01 11:45:34 -0400
commit2d79d0155e3bdf42c2b8ff450d4d4bd85ee17c72 (patch)
treef6807a37b26fba453eb0f1db4c484906ebbafb5d /src/test/test_hs_service.c
parente504b1b35831e9d18be7b89ab471705b41092606 (diff)
downloadtor-2d79d0155e3bdf42c2b8ff450d4d4bd85ee17c72.tar.gz
tor-2d79d0155e3bdf42c2b8ff450d4d4bd85ee17c72.zip
vote: Move dirvote_recalculate_timing() to voting_schedule.c
By doing so, it is renamed to voting_schedule_recalculate_timing(). This required a lot of changes to include voting_schedule.h everywhere that this function was used. This effectively now makes voting_schedule.{c|h} not include dirauth/dirvote.h for that symbol and thus no dependency on the dirauth module anymore. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r--src/test/test_hs_service.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index fc8e016b52..d2198c621b 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -52,6 +52,7 @@
#include "rendservice.h"
#include "statefile.h"
#include "dirauth/shared_random_state.h"
+#include "voting_schedule.h"
/* Trunnel */
#include "hs/cell_establish_intro.h"
@@ -1057,7 +1058,7 @@ test_rotate_descriptors(void *arg)
ret = parse_rfc1123_time("Sat, 26 Oct 1985 14:00:00 UTC",
&mock_ns.fresh_until);
tt_int_op(ret, OP_EQ, 0);
- dirvote_recalculate_timing(get_options(), mock_ns.valid_after);
+ voting_schedule_recalculate_timing(get_options(), mock_ns.valid_after);
/* Create a service with a default descriptor and state. It's added to the
* global map. */
@@ -1095,7 +1096,7 @@ test_rotate_descriptors(void *arg)
ret = parse_rfc1123_time("Sat, 27 Oct 1985 02:00:00 UTC",
&mock_ns.fresh_until);
tt_int_op(ret, OP_EQ, 0);
- dirvote_recalculate_timing(get_options(), mock_ns.valid_after);
+ voting_schedule_recalculate_timing(get_options(), mock_ns.valid_after);
/* Note down what to expect for the next rotation time which is 01:00 + 23h
* meaning 00:00:00. */
@@ -1157,7 +1158,7 @@ test_build_update_descriptors(void *arg)
ret = parse_rfc1123_time("Sat, 26 Oct 1985 04:00:00 UTC",
&mock_ns.fresh_until);
tt_int_op(ret, OP_EQ, 0);
- dirvote_recalculate_timing(get_options(), mock_ns.valid_after);
+ voting_schedule_recalculate_timing(get_options(), mock_ns.valid_after);
/* Create a service without a current descriptor to trigger a build. */
service = helper_create_service();