summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-06-12 21:07:24 +0000
committerAndrea Shepard <andrea@torproject.org>2016-06-18 16:32:16 +0000
commit5104e5645f8bdb2197e57e45eed746470056f0d3 (patch)
tree18212a701be5b049111ecbae33f6fdb8702f9f53 /src/or/networkstatus.c
parent1553512af40fea10b060db4d236527a4f73e8a6c (diff)
downloadtor-5104e5645f8bdb2197e57e45eed746470056f0d3.tar.gz
tor-5104e5645f8bdb2197e57e45eed746470056f0d3.zip
Use exponential backoffs for consensus downloads
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index db4ed85573..d5c8a262f0 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -86,9 +86,9 @@ static time_t time_to_download_next_consensus[N_CONSENSUS_FLAVORS];
static download_status_t consensus_dl_status[N_CONSENSUS_FLAVORS] =
{
{ 0, 0, 0, DL_SCHED_CONSENSUS, DL_WANT_ANY_DIRSERVER,
- DL_SCHED_INCREMENT_FAILURE, DL_SCHED_DETERMINISTIC, 0, 0 },
+ DL_SCHED_INCREMENT_FAILURE, DL_SCHED_RANDOM_EXPONENTIAL, 0, 0 },
{ 0, 0, 0, DL_SCHED_CONSENSUS, DL_WANT_ANY_DIRSERVER,
- DL_SCHED_INCREMENT_FAILURE, DL_SCHED_DETERMINISTIC, 0, 0 },
+ DL_SCHED_INCREMENT_FAILURE, DL_SCHED_RANDOM_EXPONENTIAL, 0, 0 },
};
#define N_CONSENSUS_BOOTSTRAP_SCHEDULES 2
@@ -105,10 +105,10 @@ static download_status_t
consensus_bootstrap_dl_status[N_CONSENSUS_BOOTSTRAP_SCHEDULES] =
{
{ 0, 0, 0, DL_SCHED_CONSENSUS, DL_WANT_AUTHORITY,
- DL_SCHED_INCREMENT_ATTEMPT, DL_SCHED_DETERMINISTIC, 0, 0 },
+ DL_SCHED_INCREMENT_ATTEMPT, DL_SCHED_RANDOM_EXPONENTIAL, 0, 0 },
/* During bootstrap, DL_WANT_ANY_DIRSERVER means "use fallbacks". */
{ 0, 0, 0, DL_SCHED_CONSENSUS, DL_WANT_ANY_DIRSERVER,
- DL_SCHED_INCREMENT_ATTEMPT, DL_SCHED_DETERMINISTIC, 0, 0 },
+ DL_SCHED_INCREMENT_ATTEMPT, DL_SCHED_RANDOM_EXPONENTIAL, 0, 0 },
};
/** True iff we have logged a warning about this OR's version being older than