diff --git a/lbry/lbry/blob_exchange/client.py b/lbry/lbry/blob_exchange/client.py index 8009a672f..c4c8bde30 100644 --- a/lbry/lbry/blob_exchange/client.py +++ b/lbry/lbry/blob_exchange/client.py @@ -154,7 +154,9 @@ class BlobExchangeClientProtocol(asyncio.Protocol): log.info(msg) msg = f"downloaded {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}" await asyncio.wait_for(self.writer.finished, self.peer_timeout, loop=self.loop) - log.info(msg + f" at {round((float(self._blob_bytes_received) / float(time.perf_counter() - start_time)) / 1000000.0, 2)}MB/s") + log.info("%s at %fMB/s", msg, + round((float(self._blob_bytes_received) / + float(time.perf_counter() - start_time)) / 1000000.0, 2)) # await self.blob.finished_writing.wait() not necessary, but a dangerous change. TODO: is it needed? return self._blob_bytes_received, self except asyncio.TimeoutError: diff --git a/lbry/lbry/blob_exchange/server.py b/lbry/lbry/blob_exchange/server.py index 93867e2e7..eeabe538e 100644 --- a/lbry/lbry/blob_exchange/server.py +++ b/lbry/lbry/blob_exchange/server.py @@ -102,7 +102,7 @@ class BlobServerProtocol(asyncio.Protocol): try: sent = await asyncio.wait_for(blob.sendfile(self), self.transfer_timeout, loop=self.loop) self.blob_manager.connection_manager.sent_data(self.peer_address_and_port, sent) - log.debug("sent %s (%i bytes) to %s:%i", bh, sent, peer_address, peer_port) + log.info("sent %s (%i bytes) to %s:%i", bh, sent, peer_address, peer_port) except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError, asyncio.TimeoutError) as err: if isinstance(err, asyncio.TimeoutError): log.debug("timed out sending blob %s to %s", bh, peer_address) diff --git a/lbry/lbry/dht/node.py b/lbry/lbry/dht/node.py index 01a4f9d66..625db46b5 100644 --- a/lbry/lbry/dht/node.py +++ b/lbry/lbry/dht/node.py @@ -235,7 +235,7 @@ class Node: peer.update_udp_port(udp_port_to_try) self.loop.create_task(ping(peer)) else: - log.debug("skip bad peer %s:%i for %s", blob_hash) + log.debug("skip bad peer %s:%i for %s", peer.address, peer.tcp_port, blob_hash) if to_put: result_queue.put_nowait(to_put)