mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
refactored add_addrs in peerdata and added test_peerdata.py
This commit is contained in:
committed by
Paul Robinson
parent
b478e72fac
commit
f957e310d6
@ -55,7 +55,9 @@ class PeerData(IPeerData):
|
||||
"""
|
||||
:param addrs: multiaddresses to add
|
||||
"""
|
||||
self.addrs.extend(addrs)
|
||||
for addr in addrs:
|
||||
if addr not in self.addrs:
|
||||
self.addrs.append(addr)
|
||||
|
||||
def get_addrs(self) -> List[Multiaddr]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user