[tor-commits] [doctor/master] Limit the hours when the shared random check runs

atagar at torproject.org atagar at torproject.org
Wed Jan 18 21:09:44 UTC 2017


commit f0e9e20373c1ca719083f3262ff6fce57ba46d81
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Jan 17 10:10:24 2017 -0800

    Limit the hours when the shared random check runs
    
    Shared randomness does different things during different hours so need to add
    special handling.
---
 consensus_health_checker.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 620c2ef..cca1099 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -752,6 +752,14 @@ def shared_random_commitment_mismatch(latest_consensus, consensuses, votes):
   authorities.
   """
 
+  # Check is for the commit phase which is 0:00 to 12:00 UTC. Just gonna check
+  # near the end of that.
+
+  utc_hour = datetime.datetime.utcnow().hour
+
+  if utc_hour < 8 or utc_hour >= 12:
+    return
+
   issues = []
   self_commitments = {}
 





More information about the tor-commits mailing list