mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Cleanup TODOs in pubsub
This commit is contained in:
@ -78,7 +78,6 @@ class Pubsub:
|
|||||||
|
|
||||||
topic_validators: Dict[str, TopicValidator]
|
topic_validators: Dict[str, TopicValidator]
|
||||||
|
|
||||||
# TODO: Be sure it is increased atomically everytime.
|
|
||||||
counter: int # uint64
|
counter: int # uint64
|
||||||
|
|
||||||
_tasks: List["asyncio.Future[Any]"]
|
_tasks: List["asyncio.Future[Any]"]
|
||||||
@ -300,7 +299,6 @@ class Pubsub:
|
|||||||
logger.debug("Fail to add new peer %s: stream closed", peer_id)
|
logger.debug("Fail to add new peer %s: stream closed", peer_id)
|
||||||
del self.peers[peer_id]
|
del self.peers[peer_id]
|
||||||
return
|
return
|
||||||
# TODO: Check EOF of this stream.
|
|
||||||
# TODO: Check if the peer in black list.
|
# TODO: Check if the peer in black list.
|
||||||
try:
|
try:
|
||||||
self.router.add_peer(peer_id, stream.get_protocol())
|
self.router.add_peer(peer_id, stream.get_protocol())
|
||||||
@ -328,7 +326,6 @@ class Pubsub:
|
|||||||
"""
|
"""
|
||||||
Continuously read from peer queue and each time a new peer is found,
|
Continuously read from peer queue and each time a new peer is found,
|
||||||
open a stream to the peer using a supported pubsub protocol
|
open a stream to the peer using a supported pubsub protocol
|
||||||
TODO: Handle failure for when the peer does not support any of the
|
|
||||||
pubsub protocols we support
|
pubsub protocols we support
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user