mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 23:51:07 +00:00
Add some loggings to swarm and cosmetic updates
This commit is contained in:
@ -34,7 +34,6 @@ class NetStream(INetStream):
|
||||
def set_protocol(self, protocol_id: TProtocol) -> None:
|
||||
"""
|
||||
:param protocol_id: protocol id that stream runs on
|
||||
:return: true if successful
|
||||
"""
|
||||
self.protocol_id = protocol_id
|
||||
|
||||
@ -64,7 +63,6 @@ class NetStream(INetStream):
|
||||
async def close(self) -> None:
|
||||
"""
|
||||
close stream
|
||||
:return: true if successful
|
||||
"""
|
||||
await self.muxed_stream.close()
|
||||
|
||||
|
||||
@ -16,10 +16,9 @@ class INetStream(ReadWriteCloser):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def set_protocol(self, protocol_id: TProtocol) -> bool:
|
||||
def set_protocol(self, protocol_id: TProtocol) -> None:
|
||||
"""
|
||||
:param protocol_id: protocol id that stream runs on
|
||||
:return: true if successful
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user