Add tests for discovery methods in circuit_relay_v2 (#750)

* Add test for direct_connection_relay_discovery

* Add test for mux_method_relay_discovery

* Fix newsfragments
This commit is contained in:
Sukhman Singh
2025-07-12 02:23:27 +05:30
committed by GitHub
parent 505d3b2a8f
commit dd14aad47c
5 changed files with 200 additions and 15 deletions

View File

@ -64,7 +64,11 @@ class PeerStore(IPeerStore):
return list(self.peer_data_map.keys())
def clear_peerdata(self, peer_id: ID) -> None:
"""Clears the peer data of the peer"""
"""Clears all data associated with the given peer_id."""
if peer_id in self.peer_data_map:
del self.peer_data_map[peer_id]
else:
raise PeerStoreError("peer ID not found")
def valid_peer_ids(self) -> list[ID]:
"""