diff --git a/ChangeLog b/ChangeLog index 1f29a9b21c..c3eb64a100 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,14 +6,17 @@ Changes in version 0.2.0.9-alpha - 2007-10-?? it. Extra descriptors without any real changes are dropped by the authorities, and can screw up our "publish every 18 hours" schedule. - o Minor features: + o Minor features (router descriptor cache): - If we find a cached-routers file that's been sitting around for more than 28 days unmodified, then most likely it's a leftover from when we upgraded to 0.2.0.8-alpha. Remove it. It has no good routers anyway. - o Minor bugfixes: + o Minor bugfixes (directory authorities): - Correct the implementation of "download votes by digest." Bugfix on 0.2.0.8-alpha. + - Make the "next period" votes into "current period" votes immediately + after publishing the consensus; avoid a heisenbug that made them stick + around indefinitely. o Code simplifications and refactoring: - Remove support for the old bw_accounting file: we've been storing diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 46266e0ad6..cd9cfac53f 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -1043,8 +1043,6 @@ static struct { time_t fetch_missing_signatures; /** When do we publish the consensus? */ time_t interval_starts; - /** When do we discard old votes and pending detached signatures? */ - time_t discard_old_votes; /* True iff we have generated and distributed our vote. */ int have_voted; @@ -1056,7 +1054,7 @@ static struct { int have_fetched_missing_signatures; /* True iff we have published our consensus. */ int have_published_consensus; -} voting_schedule = {0,0,0,0,0,0,0,0,0,0,0}; +} voting_schedule = {0,0,0,0,0,0,0,0,0,0}; /** Set voting_schedule to hold the timing for the next vote we should be * doing. */ @@ -1094,8 +1092,6 @@ dirvote_recalculate_timing(time_t now) voting_schedule.voting_ends = start - dist_delay; voting_schedule.fetch_missing_votes = start - dist_delay - (vote_delay/2); voting_schedule.voting_starts = start - dist_delay - vote_delay; - - voting_schedule.discard_old_votes = start; } /** Entry point: Take whatever voting actions are pending as of now. */ @@ -1138,16 +1134,13 @@ dirvote_act(time_t now) } if (voting_schedule.interval_starts < now && !voting_schedule.have_published_consensus) { - log_notice(LD_DIR, "Time to publish the consensus."); + log_notice(LD_DIR, "Time to publish the consensus and discard old votes"); dirvote_publish_consensus(); + dirvote_clear_votes(0); /* XXXX020 we will want to try again later if we haven't got enough * signatures yet. */ - voting_schedule.have_published_consensus = 1; - } - if (voting_schedule.discard_old_votes < now) { - log_notice(LD_DIR, "Time to discard old votes."); - dirvote_clear_votes(0); dirvote_recalculate_timing(now); + voting_schedule.have_published_consensus = 1; } }