diff --git a/eth-pm/src/waku.ts b/eth-pm/src/waku.ts index 726bf4f..98a94bd 100644 --- a/eth-pm/src/waku.ts +++ b/eth-pm/src/waku.ts @@ -11,12 +11,23 @@ import { validatePublicKeyMessage } from "./crypto"; import { Message } from "./messaging/Messages"; import { equals } from "uint8arrays/equals"; import { createWaku } from "js-waku/lib/create_waku"; +import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; +import { + getPredefinedBootstrapNodes, + Fleet, +} from "js-waku/lib/predefined_bootstrap_nodes"; export const PublicKeyContentTopic = "/eth-pm/1/public-key/proto"; export const PrivateMessageContentTopic = "/eth-pm/1/private-message/proto"; export async function initWaku(): Promise { - const waku = await createWaku({ defaultBootstrap: true }); + const waku = await createWaku({ + libp2p: { + peerDiscovery: [ + new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)), + ], + }, + }); await waku.start(); await waitForRemotePeer(waku, [Protocols.Filter, Protocols.LightPush]);