Client.get_permuted_peers: use self.nodeid now that it's fixed

This commit is contained in:
Brian Warner
2007-08-12 16:24:51 -07:00
parent 53349c571f
commit 1ac83637a6

View File

@ -161,10 +161,9 @@ class Client(node.Node, Referenceable):
@return: list of (permuted-peerid, peerid, connection,) @return: list of (permuted-peerid, peerid, connection,)
""" """
results = [] results = []
myid = b32decode(self.tub.tubID.upper())
for peerid, connection in self.introducer_client.get_all_peers(): for peerid, connection in self.introducer_client.get_all_peers():
assert isinstance(peerid, str) assert isinstance(peerid, str)
if not include_myself and peerid == myid: if not include_myself and peerid == self.nodeid:
self.log("get_permuted_peers: removing myself from the list") self.log("get_permuted_peers: removing myself from the list")
continue continue
permuted = bytes_to_long(sha.new(key + peerid).digest()) permuted = bytes_to_long(sha.new(key + peerid).digest())