[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] Changing the 'missing signature' warning to say authority nicknames
commit 2ab19c97f8ca45b20830a9edc7bbb09741cd03fd
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Sep 6 08:33:19 2013 -0700
Changing the 'missing signature' warning to say authority nicknames
Looks like Karsten's java version of Doctor gives authority nicknames...
Java Notification:
NOTICE: The signatures of the following, previously voting authorities are
missing from at least one consensus: turtles
Python Notification:
NOTICE: The signatures of the following, previously voting authorities are
missing from at least one consensus: 27B6B5996C426270A5C95488AA5BCEB6BCC86956
That's definitely better so swapping us to do the same.
---
consensus_health_checker.py | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 856be84..3571675 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -352,15 +352,27 @@ def consensuses_have_same_votes(latest_consensus, consensuses, votes):
def has_all_signatures(latest_consensus, consensuses, votes):
"Check that the consensuses have signatures for authorities that voted on it."
- missing_signatures = set()
+ missing_authorities = set()
for consensus in consensuses.values():
- authority_fingerprints = set([authority.fingerprint for authority in consensus.directory_authorities])
- signature_fingerprints = set([sig.identity for sig in consensus.signatures])
- missing_signatures.update(authority_fingerprints.difference(signature_fingerprints))
+ authority_signatures = set([authority.fingerprint for authority in consensus.directory_authorities])
+ signature_signatures = set([sig.identity for sig in consensus.signatures])
- if missing_signatures:
- return Issue.for_msg(Runlevel.NOTICE, 'MISSING_SIGNATURE', ', '.join(missing_signatures))
+ for missing_signature in authority_signatures.difference(signature_signatures):
+ # Attempt to translate the missing v3ident signatures into authority
+ # nicknames, falling back to just notifying of the v3ident if not found.
+
+ missing_authority = missing_signature
+
+ for authority in DIRECTORY_AUTHORITIES.values():
+ if authority.v3ident == missing_signature:
+ missing_authority = authority.nickname
+ break
+
+ missing_authorities.add(missing_authority)
+
+ if missing_authorities:
+ return Issue.for_msg(Runlevel.NOTICE, 'MISSING_SIGNATURE', ', '.join(missing_authorities))
def voting_bandwidth_scanners(latest_consensus, consensuses, votes):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits