|
@@ -80,7 +80,7 @@ PERFORM_IPV4_DIRPORT_CHECKS = False if OUTPUT_CANDIDATES else True
|
|
|
|
|
|
PERFORM_IPV6_DIRPORT_CHECKS = False if OUTPUT_CANDIDATES else False
|
|
|
|
|
|
-
|
|
|
+
|
|
|
OUTPUT_COMMENTS = True if OUTPUT_CANDIDATES else False
|
|
|
|
|
|
|
|
@@ -173,7 +173,7 @@ EXIT_BANDWIDTH_FRACTION = 1.0
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
MIN_BANDWIDTH = 102.4 * 30.0 * 1024.0
|
|
@@ -1151,6 +1151,7 @@ class Candidate(object):
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1162,6 +1163,13 @@ class Candidate(object):
|
|
|
s += 'Flags: '
|
|
|
s += cleanse_c_multiline_comment(' '.join(sorted(self._data['flags'])))
|
|
|
s += '\n'
|
|
|
+
|
|
|
+ bandwidth = self._data['measured_bandwidth']
|
|
|
+ weight = self._data['consensus_weight']
|
|
|
+ s += 'Bandwidth: %.1f MByte/s, Consensus Weight: %d'%(
|
|
|
+ bandwidth/(1024.0*1024.0),
|
|
|
+ weight)
|
|
|
+ s += '\n'
|
|
|
if self._data['contact'] is not None:
|
|
|
s += cleanse_c_multiline_comment(self._data['contact'])
|
|
|
if CONTACT_COUNT or CONTACT_BLACKLIST_COUNT:
|
|
@@ -1430,8 +1438,8 @@ class CandidateList(dict):
|
|
|
|
|
|
|
|
|
|
|
|
- logging.info('%s not a candidate: bandwidth %.1fMB/s too low, must ' +
|
|
|
- 'be at least %.1fMB/s', f._fpr,
|
|
|
+ logging.info('%s not a candidate: bandwidth %.1fMByte/s too low, ' +
|
|
|
+ 'must be at least %.1fMByte/s', f._fpr,
|
|
|
f._data['measured_bandwidth']/(1024.0*1024.0),
|
|
|
MIN_BANDWIDTH/(1024.0*1024.0))
|
|
|
self.fallbacks = above_min_bw_fallbacks
|
|
@@ -1879,8 +1887,8 @@ class CandidateList(dict):
|
|
|
min_bw = min_fb._data['measured_bandwidth']
|
|
|
max_fb = self.fallback_max()
|
|
|
max_bw = max_fb._data['measured_bandwidth']
|
|
|
- s += 'Bandwidth Range: %.1f - %.1f MB/s'%(min_bw/(1024.0*1024.0),
|
|
|
- max_bw/(1024.0*1024.0))
|
|
|
+ s += 'Bandwidth Range: %.1f - %.1f MByte/s'%(min_bw/(1024.0*1024.0),
|
|
|
+ max_bw/(1024.0*1024.0))
|
|
|
s += '\n'
|
|
|
s += '*/'
|
|
|
if fallback_count < MIN_FALLBACK_COUNT:
|