Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into expand-gossip-manag…
Browse files Browse the repository at this point in the history
…ement
  • Loading branch information
acolytec3 committed Dec 11, 2024
2 parents 8530837 + ea98869 commit 2f488bd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/portalnetwork/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,13 @@ export class PortalNetwork extends (EventEmitter as { new (): PortalNetworkEvent
* Tries to connect to any pre-configured bootnodes
*/
public bootstrap = async () => {
const boostrapRequests = []
for (const network of this.networks) {
for (const enr of this.bootnodes) {
try {
await network[1].addBootNode(enr)
network[1].logger(`Added bootnode ${enr} to ${network[1].networkId}`)
} catch (error: any) {
throw new Error(`Error adding bootnode ${enr} to network \
${network[1].networkId}: ${error.message ?? error}`)
}
boostrapRequests.push(network[1].addBootNode(enr))
}
}
void Promise.all(boostrapRequests)
}
/**
* Stops the portal network client and cleans up listeners
Expand Down

0 comments on commit 2f488bd

Please sign in to comment.