diff options
author | David Goulet <dgoulet@torproject.org> | 2017-10-27 09:16:29 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-10-27 09:23:37 -0400 |
commit | 7ee0a2b9aa71693a09687dca431cc1880774f4f4 (patch) | |
tree | cd6bb633dfcf0f7731671af751cf3b2044ed2123 /src/or/dirvote.h | |
parent | 60164f057c4ac5471754f0326ab631448cd7c120 (diff) | |
download | tor-7ee0a2b9aa71693a09687dca431cc1880774f4f4.tar.gz tor-7ee0a2b9aa71693a09687dca431cc1880774f4f4.zip |
sr: Don't use a dynamic voting schedule
The exposed get_voting_schedule() allocates and return a new object everytime
it is called leading to an awful lot of memory allocation when getting the
start time of the current round which is done for each node in the consensus.
Closes #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/dirvote.h')
-rw-r--r-- | src/or/dirvote.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/or/dirvote.h b/src/or/dirvote.h index fb3e60f000..f8eb52de81 100644 --- a/src/or/dirvote.h +++ b/src/or/dirvote.h @@ -170,18 +170,13 @@ typedef struct { int have_published_consensus; } voting_schedule_t; -voting_schedule_t *get_voting_schedule(const or_options_t *options, - time_t now, int severity); - -void voting_schedule_free(voting_schedule_t *voting_schedule_to_free); - void dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out); time_t dirvote_get_start_of_next_interval(time_t now, int interval, int offset); void dirvote_recalculate_timing(const or_options_t *options, time_t now); void dirvote_act(const or_options_t *options, time_t now); -time_t get_next_valid_after_time(time_t now); +time_t dirvote_get_next_valid_after_time(void); /* invoked on timers and by outside triggers. */ struct pending_vote_t * dirvote_add_vote(const char *vote_body, |