commit cfec958ddec6c1b104def1fdb40cacbb4e73b79d Author: Damian Johnson atagar@torproject.org Date: Sat Sep 21 11:32:03 2013 -0700
Adding default and constraints for Support022HiddenServices
Reflecting constraints for a new param in network status documents...
https://gitweb.torproject.org/torspec.git/commitdiff/6c974c5 --- stem/descriptor/networkstatus.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py index cfe6b2f..8d615fa 100644 --- a/stem/descriptor/networkstatus.py +++ b/stem/descriptor/networkstatus.py @@ -127,6 +127,7 @@ DEFAULT_PARAMS = { "cbttestfreq": 60, "cbtmintimeout": 2000, "cbtinitialtimeout": 60000, + "Support022HiddenServices": 1, }
# KeyCertificate fields, tuple is of the form... @@ -818,6 +819,8 @@ class _DocumentHeader(object): minimum = self.params.get("cbtmintimeout", minimum) elif key == "UseOptimisticData": minimum, maximum = 0, 1 + elif key == "Support022HiddenServices": + minimum, maximum = 0, 1
if value < minimum or value > maximum: raise ValueError("'%s' value on the params line must be in the range of %i - %i, was %i" % (key, minimum, maximum, value))