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
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;
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. */
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 <b>now</b>. */
}
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;
}
}