aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-15 20:37:59 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-15 20:37:59 +0000
commitda955df111e7ec8860e1bcfa528b53cfb21391dd (patch)
treed28056618b9b06a5446a9050033c8b69ff2dde04
parent516b913d5c8f5903630b1c2d5708ed1ea21ccf9a (diff)
downloadtor-da955df111e7ec8860e1bcfa528b53cfb21391dd.tar
tor-da955df111e7ec8860e1bcfa528b53cfb21391dd.tar.gz
Add some debugging logs related to dir vote timing.
svn:r11952
-rw-r--r--src/or/dirserv.c5
-rw-r--r--src/or/dirvote.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index addb3f4fc..02277b871 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1939,6 +1939,7 @@ generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
dirvote_get_preferred_voting_intervals(&timing);
v3_out->published = now;
{
+ char tbuf[ISO_TIME_LEN+1];
networkstatus_vote_t *current_consensus =
networkstatus_get_live_consensus(now);
time_t consensus_interval;
@@ -1949,6 +1950,10 @@ generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
consensus_interval = timing.vote_interval;
v3_out->valid_after =
dirvote_get_start_of_next_interval(now, consensus_interval);
+ format_iso_time(tbuf, v3_out->valid_after);
+ log_notice(LD_DIR,"Choosing valid-after time in vote as %s: "
+ "consensus_set=%d, interval=%d",
+ tbuf, current_consensus?1:0, consensus_interval);
}
v3_out->fresh_until = v3_out->valid_after + timing.vote_interval;
v3_out->valid_until = v3_out->valid_after +
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 44a1edcb3..7e131ef46 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1092,6 +1092,14 @@ 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;
+
+ {
+ char tbuf[ISO_TIME_LEN+1];
+ format_iso_time(tbuf, voting_schedule.interval_starts);
+ log_notice(LD_DIR,"Choosing expected valid-after time as %s: "
+ "consensus_set=%d, interval=%d",
+ tbuf, consensus?1:0, interval);
+ }
}
/** Entry point: Take whatever voting actions are pending as of <b>now</b>. */