mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Add some debugging logs related to dir vote timing.
svn:r11952
This commit is contained in:
parent
516b913d5c
commit
da955df111
@ -1939,6 +1939,7 @@ generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
|
|||||||
dirvote_get_preferred_voting_intervals(&timing);
|
dirvote_get_preferred_voting_intervals(&timing);
|
||||||
v3_out->published = now;
|
v3_out->published = now;
|
||||||
{
|
{
|
||||||
|
char tbuf[ISO_TIME_LEN+1];
|
||||||
networkstatus_vote_t *current_consensus =
|
networkstatus_vote_t *current_consensus =
|
||||||
networkstatus_get_live_consensus(now);
|
networkstatus_get_live_consensus(now);
|
||||||
time_t consensus_interval;
|
time_t consensus_interval;
|
||||||
@ -1949,6 +1950,10 @@ generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
|
|||||||
consensus_interval = timing.vote_interval;
|
consensus_interval = timing.vote_interval;
|
||||||
v3_out->valid_after =
|
v3_out->valid_after =
|
||||||
dirvote_get_start_of_next_interval(now, consensus_interval);
|
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->fresh_until = v3_out->valid_after + timing.vote_interval;
|
||||||
v3_out->valid_until = v3_out->valid_after +
|
v3_out->valid_until = v3_out->valid_after +
|
||||||
|
@ -1092,6 +1092,14 @@ dirvote_recalculate_timing(time_t now)
|
|||||||
voting_schedule.voting_ends = start - dist_delay;
|
voting_schedule.voting_ends = start - dist_delay;
|
||||||
voting_schedule.fetch_missing_votes = start - dist_delay - (vote_delay/2);
|
voting_schedule.fetch_missing_votes = start - dist_delay - (vote_delay/2);
|
||||||
voting_schedule.voting_starts = start - dist_delay - vote_delay;
|
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>. */
|
/** Entry point: Take whatever voting actions are pending as of <b>now</b>. */
|
||||||
|
Loading…
Reference in New Issue
Block a user