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/shared_random_state.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/shared_random_state.h')
-rw-r--r-- | src/or/shared_random_state.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/shared_random_state.h b/src/or/shared_random_state.h index b6af6e1721..866725c435 100644 --- a/src/or/shared_random_state.h +++ b/src/or/shared_random_state.h @@ -130,7 +130,7 @@ unsigned int sr_state_get_protocol_run_duration(void); STATIC int disk_state_load_from_disk_impl(const char *fname); STATIC sr_phase_t get_sr_protocol_phase(time_t valid_after); -STATIC time_t get_start_time_of_current_round(time_t now); +STATIC time_t get_start_time_of_current_round(void); STATIC time_t get_state_valid_until_time(time_t now); STATIC const char *get_phase_str(sr_phase_t phase); |