From 6508403912e356523ef71a93531789700de4e74c Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 29 Aug 2022 15:16:05 +1000 Subject: [PATCH] fix: use nwaku test fleet Filter bug not yet deployed in prod ref: https://github.com/status-im/nwaku/pull/1090 --- eth-pm/src/waku.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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]);