diff options
author | Linus Nordberg <linus@torproject.org> | 2013-06-05 15:48:57 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2013-06-08 15:25:32 +0200 |
commit | 4d54b9774d11f47c6a670ab9b380e027a524f5f9 (patch) | |
tree | 6256b3849c531a7ff05914e6055f24b6befdbc06 /src/or/dirserv.c | |
parent | bcdc0022693c75ea1523468e783bf03832e0a358 (diff) | |
download | tor-4d54b9774d11f47c6a670ab9b380e027a524f5f9.tar.gz tor-4d54b9774d11f47c6a670ab9b380e027a524f5f9.zip |
Add support for offsetting the voting interval in order to bootstrap faster.
A new option TestingV3AuthVotingStartOffset is added which offsets the
starting time of the voting interval. This is possible only when
TestingTorNetwork is set.
This patch makes run_scheduled_events() check for new consensus
downloads every second when TestingTorNetwork, instead of every
minute. This should be fine, see #8532 for reasoning.
This patch also brings MIN_VOTE_SECONDS and MIN_DIST_SECONDS down from
20 to 2 seconds, unconditionally. This makes sanity checking of
misconfiguration slightly less sane.
Addresses #8532.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c75f638b69..8bc55a8ebb 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3093,7 +3093,8 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, else last_consensus_interval = options->TestingV3AuthInitialVotingInterval; v3_out->valid_after = - dirvote_get_start_of_next_interval(now, (int)last_consensus_interval); + dirvote_get_start_of_next_interval(now, (int)last_consensus_interval, + options->TestingV3AuthVotingStartOffset); format_iso_time(tbuf, v3_out->valid_after); log_notice(LD_DIR,"Choosing valid-after time in vote as %s: " "consensus_set=%d, last_interval=%d", |