mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Use approx_time() instead of time(NULL) in some HS functions.
These were breaking our unittests.
This commit is contained in:
parent
05c362274b
commit
5fb6f656df
@ -433,7 +433,7 @@ service_intro_point_new(const extend_info_t *ei, unsigned int is_legacy)
|
||||
if (BUG(intro_point_max_lifetime < intro_point_min_lifetime)) {
|
||||
goto err;
|
||||
}
|
||||
ip->time_to_expire = time(NULL) +
|
||||
ip->time_to_expire = approx_time() +
|
||||
crypto_rand_int_range(intro_point_min_lifetime,intro_point_max_lifetime);
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ voting_schedule_get_next_valid_after_time(void)
|
||||
|
||||
done:
|
||||
if (need_to_recalculate_voting_schedule) {
|
||||
voting_schedule_recalculate_timing(get_options(), now);
|
||||
voting_schedule_recalculate_timing(get_options(), approx_time());
|
||||
voting_schedule.created_on_demand = 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user