From a21d9e878bc97f0f51ea756438c129df5f057e38 Mon Sep 17 00:00:00 2001 From: lla-dane Date: Mon, 11 Aug 2025 09:48:45 +0530 Subject: [PATCH] recompile protobuf schema and remove typos --- libp2p/kad_dht/kad_dht.py | 2 +- libp2p/kad_dht/peer_routing.py | 1 - tests/core/kad_dht/test_kad_dht.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libp2p/kad_dht/kad_dht.py b/libp2p/kad_dht/kad_dht.py index 2a3a2b1a..78cf50e2 100644 --- a/libp2p/kad_dht/kad_dht.py +++ b/libp2p/kad_dht/kad_dht.py @@ -364,7 +364,7 @@ class KadDHT(Service): envelope, _ = consume_envelope( message.senderRecord, "libp2p-peer-record" ) - # Use the default TTL of 2 hours (72000 seconds) + # Use the default TTL of 2 hours (7200 seconds) if not self.host.get_peerstore().consume_peer_record( envelope, 7200 ): diff --git a/libp2p/kad_dht/peer_routing.py b/libp2p/kad_dht/peer_routing.py index a2f3d193..58406f05 100644 --- a/libp2p/kad_dht/peer_routing.py +++ b/libp2p/kad_dht/peer_routing.py @@ -361,7 +361,6 @@ class PeerRouting(IPeerRouting): ) except Exception as e: - print("EXCEPTION CAME") logger.debug(f"Error querying peer {peer} for closest: {e}") finally: diff --git a/tests/core/kad_dht/test_kad_dht.py b/tests/core/kad_dht/test_kad_dht.py index eaf9a956..70d9a5e9 100644 --- a/tests/core/kad_dht/test_kad_dht.py +++ b/tests/core/kad_dht/test_kad_dht.py @@ -86,7 +86,7 @@ async def test_find_node(dht_pair: tuple[KadDHT, KadDHT]): dht_b.host.get_peerstore().get_peer_record(dht_a.host.get_id()), Envelope ) - # Verifies if the senderRecord in the FIND_NODE response is correctly proccessed + # Verifies if the senderRecord in the FIND_NODE response is correctly processed assert isinstance( dht_a.host.get_peerstore().get_peer_record(dht_b.host.get_id()), Envelope )