added peer-store cleanup task in ping example

This commit is contained in:
lla-dane
2025-07-19 23:06:15 +05:30
parent 09e151aafc
commit 64bc388b33
2 changed files with 7 additions and 0 deletions

View File

@ -1327,6 +1327,10 @@ class IPeerStore(
def clear_peerdata(self, peer_id: ID) -> None:
"""clear_peerdata"""
@abstractmethod
async def start_cleanup_task(self, cleanup_interval: int = 3600) -> None:
"""Start periodic cleanup of expired peer records and addresses."""
# -------------------------- listener interface.py --------------------------