Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Nov 15, 2021
1 parent 0da287a commit 8dfad5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/lodestar/src/network/peers/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ export class PeerDiscovery {
*/
private async runFindRandomNodeQuery(): Promise<void> {
// Delay the 1st query after starting discv5
// See https://github.com/ChainSafe/lodestar/issues/3423
if (Date.now() - this.discv5StartMs <= this.discv5FirstQueryDelayMs) {
return;
}

// Run a general discv5 query if one is not already in progress
if (this.randomNodeQuery.code === QueryStatusCode.Active) {
this.metrics?.discovery.findNodeQueryRequests.inc({action: "ignore"});
Expand Down

0 comments on commit 8dfad5d

Please sign in to comment.