From a7a79ce4b7be75f24a15bd23aba79ed180715f60 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Mon, 29 Jun 2020 20:16:12 +0900 Subject: [PATCH] Fix a retry limit condition (#1306) --- beacon_node/eth2_libp2p/src/discovery/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/eth2_libp2p/src/discovery/mod.rs b/beacon_node/eth2_libp2p/src/discovery/mod.rs index aae58d15d..04af9b412 100644 --- a/beacon_node/eth2_libp2p/src/discovery/mod.rs +++ b/beacon_node/eth2_libp2p/src/discovery/mod.rs @@ -369,7 +369,7 @@ impl Discovery { /// updates the min_ttl field. fn add_subnet_query(&mut self, subnet_id: SubnetId, min_ttl: Option, retries: usize) { // remove the entry and complete the query if greater than the maximum search count - if retries >= MAX_DISCOVERY_RETRY { + if retries > MAX_DISCOVERY_RETRY { debug!( self.log, "Subnet peer discovery did not find sufficient peers. Reached max retry limit"