[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [chutney/master] TorNet: Move V3_AUTH_VOTING_INTERVAL to module level
commit 2f11775d716168f9d82370a14cf21cd1b919bcc0
Author: teor <teor@xxxxxxxxxxxxxx>
Date: Sat Mar 14 19:23:35 2020 +1000
TorNet: Move V3_AUTH_VOTING_INTERVAL to module level
Preparation for 33615.
---
lib/chutney/TorNet.py | 6 +++---
scripts/chutney_tests/verify.py | 10 +++++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 8ce4efa..c3bdde8 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -31,6 +31,9 @@ import chutney.Templating
import chutney.Traffic
import chutney.Util
+# Keep in sync with torrc_templates/authority.i V3AuthVotingInterval
+V3_AUTH_VOTING_INTERVAL = 20.0
+
_BASE_ENVIRON = None
_TOR_VERSIONS = None
_TORRC_OPTIONS = None
@@ -2145,9 +2148,6 @@ class Network(object):
dmsg))
print()
- # Keep in sync with torrc_templates/authority.i V3AuthVotingInterval
- V3_AUTH_VOTING_INTERVAL = 20.0
-
CHECK_NETWORK_STATUS_DELAY = 1.0
PRINT_NETWORK_STATUS_DELAY = V3_AUTH_VOTING_INTERVAL/2.0
WAIT_FOR_UNCHECKED_DIR_INFO_DELAY = V3_AUTH_VOTING_INTERVAL + 1.0
diff --git a/scripts/chutney_tests/verify.py b/scripts/chutney_tests/verify.py
index 2f048e0..825d41f 100644
--- a/scripts/chutney_tests/verify.py
+++ b/scripts/chutney_tests/verify.py
@@ -5,11 +5,15 @@ from __future__ import unicode_literals
import time
import chutney
+import chutney.TorNet
+import chutney.Traffic
+
+# Try to verify twice each consensus, but don't verify too fast
+V3_AUTH_VOTING_INTERVAL = chutney.TorNet.V3_AUTH_VOTING_INTERVAL
+VERIFY_ATTEMPT_INTERVAL = V3_AUTH_VOTING_INTERVAL/2.0 - 1.0
+TIMEOUT_INTERVAL = max(VERIFY_ATTEMPT_INTERVAL - 1.0, 5.0)
def run_test(network):
- # Try to verify twice each consensus
- VERIFY_ATTEMPT_INTERVAL = network.V3_AUTH_VOTING_INTERVAL/2.0 - 1.0
- TIMEOUT_INTERVAL = max(VERIFY_ATTEMPT_INTERVAL - 1.0, 5.0)
wait_time = network._dfltEnv['bootstrap_time']
start_time = time.time()
end_time = start_time + wait_time
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits