From 275148a15288dcb158d80fff254394ca1b2ea7c7 Mon Sep 17 00:00:00 2001 From: Pawan Dhananjay Date: Thu, 9 Jul 2020 07:13:48 +0530 Subject: [PATCH] Fix query expiry computation (#1346) --- beacon_node/eth2_libp2p/src/discovery/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/eth2_libp2p/src/discovery/mod.rs b/beacon_node/eth2_libp2p/src/discovery/mod.rs index e6db78508e..d8b9015f0b 100644 --- a/beacon_node/eth2_libp2p/src/discovery/mod.rs +++ b/beacon_node/eth2_libp2p/src/discovery/mod.rs @@ -75,7 +75,7 @@ impl QueryType { Self::FindPeers => false, Self::Subnet { min_ttl, .. } => { if let Some(ttl) = min_ttl { - ttl > &Instant::now() + ttl < &Instant::now() } else { true } @@ -471,7 +471,7 @@ impl Discovery { .count(); if peers_on_subnet > TARGET_SUBNET_PEERS { - trace!(self.log, "Discovery ignored"; + debug!(self.log, "Discovery ignored"; "reason" => "Already connected to desired peers", "connected_peers_on_subnet" => peers_on_subnet, "target_subnet_peers" => TARGET_SUBNET_PEERS,