fix: use nwaku test fleet
Filter bug not yet deployed in prod ref: https://github.com/status-im/nwaku/pull/1090
This commit is contained in:
parent
3606654b4d
commit
6508403912
|
@ -11,12 +11,23 @@ import { validatePublicKeyMessage } from "./crypto";
|
||||||
import { Message } from "./messaging/Messages";
|
import { Message } from "./messaging/Messages";
|
||||||
import { equals } from "uint8arrays/equals";
|
import { equals } from "uint8arrays/equals";
|
||||||
import { createWaku } from "js-waku/lib/create_waku";
|
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 PublicKeyContentTopic = "/eth-pm/1/public-key/proto";
|
||||||
export const PrivateMessageContentTopic = "/eth-pm/1/private-message/proto";
|
export const PrivateMessageContentTopic = "/eth-pm/1/private-message/proto";
|
||||||
|
|
||||||
export async function initWaku(): Promise<Waku> {
|
export async function initWaku(): Promise<Waku> {
|
||||||
const waku = await createWaku({ defaultBootstrap: true });
|
const waku = await createWaku({
|
||||||
|
libp2p: {
|
||||||
|
peerDiscovery: [
|
||||||
|
new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
await waku.start();
|
await waku.start();
|
||||||
await waitForRemotePeer(waku, [Protocols.Filter, Protocols.LightPush]);
|
await waitForRemotePeer(waku, [Protocols.Filter, Protocols.LightPush]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue