feat(host): add get_live_peers() to track connection state

This commit is contained in:
Winter-Soren
2025-03-07 01:38:22 +05:30
committed by Paul Robinson
parent f6279c23ac
commit b2a6294cfa
4 changed files with 217 additions and 0 deletions

View File

@ -1143,6 +1143,12 @@ class IHost(ABC):
"""
@abstractmethod
def get_live_peers(self) -> list[ID]:
"""
:return: List of peer IDs that have active connections
"""
@abstractmethod
def run(self, listen_addrs: Sequence[Multiaddr]) -> AsyncContextManager[None]:
"""