updated same_home_as to work for variable number of addresses

This commit is contained in:
Alex Haynes 2019-04-19 21:00:55 -04:00
parent 3fa6a165b3
commit dbe3fcbf5a

View File

@ -29,8 +29,7 @@ class KadPeerInfo(PeerInfo):
def same_home_as(self, node):
#TODO: handle more than one addr
return self.addrs[0] == node.addrs[0]
return sorted(self.addrs) == sorted(node.addrs)
def distance_to(self, node):
"""