updated same_home_as to work for variable number of addresses
This commit is contained in:
parent
3fa6a165b3
commit
dbe3fcbf5a
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user