|
@@ -18,6 +18,7 @@ import network
|
|
|
# addr: a network address
|
|
|
# bw: bandwidth
|
|
|
# flags: relay flags
|
|
|
+# pathselkey: a path selection public key (Single-Pass Walking Onions only)
|
|
|
# vrfkey: a VRF public key (Single-Pass Walking Onions only)
|
|
|
# sig: a signature over the above by the idkey
|
|
|
class RelayDescriptor:
|
|
@@ -26,10 +27,10 @@ class RelayDescriptor:
|
|
|
|
|
|
def __str__(self, withsig = True):
|
|
|
res = "RelayDesc [\n"
|
|
|
- for k in ["epoch", "idkey", "onionkey", "addr", "bw", "flags",
|
|
|
- "vrfkey", "sig"]:
|
|
|
+ for k in ["epoch", "idkey", "onionkey", "pathselkey", "addr",
|
|
|
+ "bw", "flags", "vrfkey", "sig"]:
|
|
|
if k in self.descdict:
|
|
|
- if k == "idkey" or k == "onionkey":
|
|
|
+ if k == "idkey" or k == "onionkey" or k == "pathselkey":
|
|
|
res += " " + k + ": " + nacl.encoding.HexEncoder.encode(self.descdict[k]).decode("ascii") + "\n"
|
|
|
elif k == "sig":
|
|
|
if withsig:
|