r15581@catbus: nickm | 2007-10-09 14:36:47 -0400

Recompute voting schedule whenever a consensus is set.


svn:r11808
This commit is contained in:
Nick Mathewson
2007-10-09 18:36:56 +00:00
parent f1d4e3477b
commit 23614f9523
3 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -1080,8 +1080,6 @@ static struct {
void
dirvote_recalculate_timing(time_t now)
{
/* XXXX020 call this when inputs may have changed (i.e., whenver we get a
* fresh consensus.) */
int interval, vote_delay, dist_delay;
time_t start;
time_t end;
@@ -1361,6 +1359,7 @@ dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
again:
vote = networkstatus_parse_vote_from_string(vote_body, &end_of_vote, 1);
if (!vote) {
log_warn(LD_DIR, "Couldn't parse vote: length was %d", strlen(vote_body));
*msg_out = "Unable to parse vote";
goto err;
}
+1
View File
@@ -1015,6 +1015,7 @@ networkstatus_set_current_consensus(const char *consensus, int from_cache,
current_consensus = c;
update_consensus_networkstatus_fetch_time(now);
dirvote_recalculate_timing(now);
if (!from_cache) {
or_options_t *options = get_options();