[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [depictor/master] Fix bug so we list all the DirAuths even if they are not listed in the consensus.



commit 86b5181cc11abffff0bcfeb8ef0fc0ff7216c6dd
Author: Tom Ritter <tom@xxxxxxxxx>
Date:   Thu Apr 2 17:57:09 2015 -0400

    Fix bug so we list all the DirAuths even if they are not listed in the consensus.
---
 data/consensus.cfg |    2 +-
 website.py         |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/data/consensus.cfg b/data/consensus.cfg
index f8394b2..c57144a 100644
--- a/data/consensus.cfg
+++ b/data/consensus.cfg
@@ -6,8 +6,8 @@ ignored_authorities turtles
 
 bandwidth_authorities moria1
 bandwidth_authorities gabelmoo
-bandwidth_authorities maatuska
 bandwidth_authorities tor26
+bandwidth_authorities longclaw
 
 # recognized tor consensus parameters
 
diff --git a/website.py b/website.py
index e75eca0..fa7bb8e 100755
--- a/website.py
+++ b/website.py
@@ -10,6 +10,7 @@ import os
 import time
 import operator
 import datetime
+import stem.descriptor.remote
 from base64 import b64decode
 from Crypto.PublicKey import RSA
 
@@ -45,9 +46,9 @@ class WebsiteWriter:
 	def set_consensuses(self, c):
 		self.consensuses = c
 		self.consensus = max(c.itervalues(), key=operator.attrgetter('valid_after'))
-		# XXX - Change this to be a list of known dir auths, don't calculate it off the consensus because sometimes they're missing entirely
 		self.known_authorities = set([r.nickname for r in self.consensus.routers.values() if 'Authority' in r.flags and r.nickname != "Tonga"])
 		self.known_authorities.update([r.nickname for r in self.consensus.directory_authorities])
+		self.known_authorities.update([r for r in stem.descriptor.remote.get_authorities().keys() if r != "Tonga"])
 	def set_votes(self, v):
 		self.votes = v
 	def set_consensus_expirey(self, timedelta):
@@ -185,8 +186,6 @@ class WebsiteWriter:
 				else:
 					self.site.write("    <td class=\"oiv\">Missing Signature, and "
 					+ authority.nickname + " does not have a consensus available</td>\n")
-			else:
-				self.site.write("    <td class=\"oiv\">Authority not listed as a dir-source</td>\n")
 			self.site.write("  </tr>\n")
 		self.site.write("</table>\n")
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits