Fix a retry limit condition (#1306)

This commit is contained in:
Akihito Nakano 2020-06-29 20:16:12 +09:00 committed by GitHub
parent 916a133043
commit a7a79ce4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,7 +369,7 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
/// updates the min_ttl field. /// updates the min_ttl field.
fn add_subnet_query(&mut self, subnet_id: SubnetId, min_ttl: Option<Instant>, retries: usize) { fn add_subnet_query(&mut self, subnet_id: SubnetId, min_ttl: Option<Instant>, retries: usize) {
// remove the entry and complete the query if greater than the maximum search count // 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!( debug!(
self.log, self.log,
"Subnet peer discovery did not find sufficient peers. Reached max retry limit" "Subnet peer discovery did not find sufficient peers. Reached max retry limit"