summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-09 15:07:51 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 20:00:47 -0400
commit5f90d28c01960921ad1cd680ba7e1275a44345c0 (patch)
tree08e99390bd1cc016b47d6fa4ab01a763abf18f56 /src/or
parent73c9c16faab299b483716c1b8e76c433282d3d50 (diff)
downloadtor-5f90d28c01960921ad1cd680ba7e1275a44345c0.tar.gz
tor-5f90d28c01960921ad1cd680ba7e1275a44345c0.zip
Remove MIN_METHOD_FOR_{SHARED_RANDOM,EXCLUDING_INVALID_NODES}
Also remove client detection for pre-EXCLUDING_INVALID_NODES consensuses, and a test for that detection.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dirvote.c5
-rw-r--r--src/or/dirvote.h8
-rw-r--r--src/or/routerparse.c3
3 files changed, 3 insertions, 13 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 6b553083b1..25ca961fa6 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1524,7 +1524,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
smartlist_add_strdup(chunks, "\n");
}
- if (consensus_method >= MIN_METHOD_FOR_SHARED_RANDOM) {
+ {
int num_dirauth = get_n_authorities(V3_DIRINFO);
/* Default value of this is 2/3 of the total number of authorities. For
* instance, if we have 9 dirauth, the default value is 6. The following
@@ -1935,8 +1935,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
/* Starting with consensus method 24, we don't list servers
* that are not valid in a consensus. See Proposal 272 */
- if (!is_valid &&
- consensus_method >= MIN_METHOD_FOR_EXCLUDING_INVALID_NODES)
+ if (!is_valid)
continue;
/* Pick the version. */
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index defcdf5754..8a317deb47 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -61,14 +61,6 @@
/** The highest consensus method that we currently support. */
#define MAX_SUPPORTED_CONSENSUS_METHOD 28
-/** Lowest consensus method where authorities may include a shared random
- * value(s). */
-#define MIN_METHOD_FOR_SHARED_RANDOM 23
-
-/** Lowest consensus method where authorities drop all nodes that don't get
- * the Valid flag. */
-#define MIN_METHOD_FOR_EXCLUDING_INVALID_NODES 24
-
/** Lowest consensus method where authorities vote on required/recommended
* protocols. */
#define MIN_METHOD_FOR_RECOMMENDED_PROTOCOLS 25
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 79499f2e6f..1834cfad24 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2743,8 +2743,7 @@ routerstatus_parse_entry_from_string(memarea_t *area,
/* These are implied true by having been included in a consensus made
* with a given method */
rs->is_flagged_running = 1; /* Starting with consensus method 4. */
- if (consensus_method >= MIN_METHOD_FOR_EXCLUDING_INVALID_NODES)
- rs->is_valid = 1;
+ rs->is_valid = 1; /* Starting with consensus method 24. */
}
{
const char *protocols = NULL, *version = NULL;