From 7cf0495f3734ee8aeffcafe484a8934e83817a17 Mon Sep 17 00:00:00 2001 From: mhchia Date: Thu, 19 Sep 2019 15:38:38 +0800 Subject: [PATCH] Remove `print` --- libp2p/network/connection/swarm_connection.py | 3 --- libp2p/network/swarm.py | 2 -- libp2p/stream_muxer/mplex/mplex.py | 1 - 3 files changed, 6 deletions(-) diff --git a/libp2p/network/connection/swarm_connection.py b/libp2p/network/connection/swarm_connection.py index f53ac7e..b72fd25 100644 --- a/libp2p/network/connection/swarm_connection.py +++ b/libp2p/network/connection/swarm_connection.py @@ -44,7 +44,6 @@ class SwarmConn(INetConn): async def _handle_new_streams(self) -> None: # TODO: Break the loop when anything wrong in the connection. while True: - print("!@# SwarmConn._handle_new_streams") stream = await self.conn.accept_stream() # Asynchronously handle the accepted stream, to avoid blocking the next stream. await self.run_task(self._handle_muxed_stream(stream)) @@ -57,7 +56,6 @@ class SwarmConn(INetConn): await self.run_task(self.swarm.common_stream_handler(net_stream)) async def _add_stream(self, muxed_stream: IMuxedStream) -> NetStream: - print("!@# SwarmConn._add_stream:", muxed_stream) net_stream = NetStream(muxed_stream) # Call notifiers since event occurred for notifee in self.swarm.notifees: @@ -65,7 +63,6 @@ class SwarmConn(INetConn): return net_stream async def start(self) -> None: - print("!@# SwarmConn.start") await self.run_task(self._handle_new_streams()) async def run_task(self, coro: Awaitable[Any]) -> None: diff --git a/libp2p/network/swarm.py b/libp2p/network/swarm.py index c8c4a1d..dd4ca6e 100644 --- a/libp2p/network/swarm.py +++ b/libp2p/network/swarm.py @@ -145,10 +145,8 @@ class Swarm(INetwork): protocol_ids, ) - print(f"!@# swarm.new_stream: 0") swarm_conn = await self.dial_peer(peer_id) - print(f"!@# swarm.new_stream: 1") net_stream = await swarm_conn.new_stream() logger.debug("successfully opened a stream to peer %s", peer_id) return net_stream diff --git a/libp2p/stream_muxer/mplex/mplex.py b/libp2p/stream_muxer/mplex/mplex.py index 0e950aa..afbf288 100644 --- a/libp2p/stream_muxer/mplex/mplex.py +++ b/libp2p/stream_muxer/mplex/mplex.py @@ -97,7 +97,6 @@ class Mplex(IMuxedConn): stream = MplexStream(name, stream_id, self) async with self.streams_lock: self.streams[stream_id] = stream - print(f"!@# _initialize_stream: stream_id={stream_id}, name={name}") return stream async def open_stream(self) -> IMuxedStream: