From aca4a243d68395fbd2364a917687127e19ad94f4 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 8 Feb 2022 17:10:33 -0300 Subject: [PATCH] log bottom out of peer search in debug, show short key id for find value --- lbry/dht/protocol/iterative_find.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lbry/dht/protocol/iterative_find.py b/lbry/dht/protocol/iterative_find.py index 31af402c3..31e6ab56a 100644 --- a/lbry/dht/protocol/iterative_find.py +++ b/lbry/dht/protocol/iterative_find.py @@ -351,9 +351,10 @@ class IterativeNodeFinder(IterativeFinder): if self.are_k_closest_peers_ready: self.put_result(self.active, True) elif self.bottom_out_count >= self.bottom_out_limit or self.iteration_count >= self.bottom_out_limit: - log.info("peer search bottomed out.") + log.debug("peer search bottomed out.") self.put_result(self.active, True) + class IterativeValueFinder(IterativeFinder): def __init__(self, loop: asyncio.AbstractEventLoop, peer_manager: 'PeerManager', routing_table: 'TreeRoutingTable', protocol: 'KademliaProtocol', key: bytes, @@ -420,10 +421,10 @@ class IterativeValueFinder(IterativeFinder): elif self.is_closest_peer_ready: self.bottom_out_count += 1 if self.are_k_closest_peers_ready: - log.info("blob peer search finished.") + log.info("blob peer search finished for %s", self.key.hex()[:8]) self.iteration_queue.put_nowait(None) elif self.bottom_out_count >= self.bottom_out_limit: - log.info("blob peer search bottomed out") + log.info("blob peer search bottomed out for %s", self.key.hex()[:8]) self.iteration_queue.put_nowait(None) def get_initial_result(self) -> typing.List['KademliaPeer']: