From 11e60aadd53a7310e784c8fa3193c8356b2b7670 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Sat, 6 Aug 2022 00:54:46 +1000 Subject: [PATCH] refactor: move predefined nodes out of dns discovery --- .size-limit.cjs | 2 +- src/lib/create_waku.ts | 2 +- .../predefined.ts => predefined_bootstrap_nodes.ts} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/lib/{peer_discovery_dns/predefined.ts => predefined_bootstrap_nodes.ts} (97%) diff --git a/.size-limit.cjs b/.size-limit.cjs index d48811ec21..3c5d0d8261 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -15,7 +15,7 @@ module.exports = [ { name: "Asymmetric, symmetric encryption and signature", path: "bundle/index.js", - import: "{ waku_message }", + import: "{ WakuMessage }", }, { name: "DNS discovery", diff --git a/src/lib/create_waku.ts b/src/lib/create_waku.ts index 50e9edc7c4..9e3be207a8 100644 --- a/src/lib/create_waku.ts +++ b/src/lib/create_waku.ts @@ -6,8 +6,8 @@ import { all as filterAll } from "@libp2p/websockets/filters"; import { createLibp2p, Libp2pOptions } from "libp2p"; import type { Libp2p } from "libp2p"; -import { getPredefinedBootstrapNodes } from "./peer_discovery_dns/predefined"; import { PeerDiscoveryStaticPeers } from "./peer_discovery_static_list"; +import { getPredefinedBootstrapNodes } from "./predefined_bootstrap_nodes"; import { Waku, WakuOptions } from "./waku"; import { WakuFilter } from "./waku_filter"; import { WakuLightPush } from "./waku_light_push"; diff --git a/src/lib/peer_discovery_dns/predefined.ts b/src/lib/predefined_bootstrap_nodes.ts similarity index 97% rename from src/lib/peer_discovery_dns/predefined.ts rename to src/lib/predefined_bootstrap_nodes.ts index 553a6a0058..04b662f59d 100644 --- a/src/lib/peer_discovery_dns/predefined.ts +++ b/src/lib/predefined_bootstrap_nodes.ts @@ -1,6 +1,6 @@ import { Multiaddr } from "@multiformats/multiaddr"; -import { getPseudoRandomSubset } from "../random_subset"; +import { getPseudoRandomSubset } from "./random_subset"; export const DefaultWantedNumber = 1;