diff --git a/packages/portalnetwork/src/networks/network.ts b/packages/portalnetwork/src/networks/network.ts index 4dc010acf..e40675140 100644 --- a/packages/portalnetwork/src/networks/network.ts +++ b/packages/portalnetwork/src/networks/network.ts @@ -823,11 +823,13 @@ export abstract class BaseNetwork extends EventEmitter { // Disregard attempts to add oneself as a bootnode return } - await this.sendPing(enr) - for (let x = 239; x < 256; x++) { - // Ask for nodes in all log2distances 239 - 256 - if (this.routingTable.valuesOfDistance(x).length === 0) { - await this.sendFindNodes(enr, [x]) + const pong = await this.sendPing(enr) + if (pong !== undefined) { + for (let x = 239; x < 256; x++) { + // Ask for nodes in all log2distances 239 - 256 + if (this.routingTable.valuesOfDistance(x).length < 16 ) { + await this.sendFindNodes(enr, [x]) + } } } }