mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
added test for connected peers
This commit is contained in:
committed by
Paul Robinson
parent
847dfa6577
commit
17575f4a38
@ -146,7 +146,10 @@ class BasicHost(IHost):
|
||||
return addrs
|
||||
|
||||
def get_connected_peers(self) -> List[ID]:
|
||||
return list(self.get_network().connections.keys())
|
||||
"""
|
||||
:return: all the ids of peers this host is currently connected to
|
||||
"""
|
||||
return list(self._network.connections.keys())
|
||||
|
||||
@asynccontextmanager
|
||||
async def run(
|
||||
|
||||
Reference in New Issue
Block a user