mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
updated same_home_as to work for variable number of addresses
This commit is contained in:
@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user