From 1562f0fd6fd1206c2f76006311c730bc8676c1e5 Mon Sep 17 00:00:00 2001 From: gabrielmer <101006718+gabrielmer@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:22:36 +0300 Subject: [PATCH] debug: fixing peer exchange tests (#1990) Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com> --- .../tests/tests/peer-exchange/pe.optional.spec.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/tests/tests/peer-exchange/pe.optional.spec.ts b/packages/tests/tests/peer-exchange/pe.optional.spec.ts index 3042dbe848..4428b19398 100644 --- a/packages/tests/tests/peer-exchange/pe.optional.spec.ts +++ b/packages/tests/tests/peer-exchange/pe.optional.spec.ts @@ -5,7 +5,11 @@ import { } from "@waku/core/lib/predefined_bootstrap_nodes"; import { wakuPeerExchangeDiscovery } from "@waku/discovery"; import type { LightNode } from "@waku/interfaces"; -import { createLightNode, DefaultPubsubTopic } from "@waku/sdk"; +import { createLightNode } from "@waku/sdk"; +import { + singleShardInfosToShardInfo, + singleShardInfoToPubsubTopic +} from "@waku/utils"; import { expect } from "chai"; import { afterEachCustom, tearDownNodes } from "../../src"; @@ -28,13 +32,17 @@ describe("Peer Exchange", () => { this.timeout(50_000); const predefinedNodes = getPredefinedBootstrapNodes(name, nodes); + const singleShardInfo = { clusterId: 1, shard: 1 }; + const shardInfo = singleShardInfosToShardInfo([singleShardInfo]); + const pubsubTopic = singleShardInfoToPubsubTopic(singleShardInfo); waku = await createLightNode({ libp2p: { peerDiscovery: [ bootstrap({ list: predefinedNodes }), - wakuPeerExchangeDiscovery([DefaultPubsubTopic]) + wakuPeerExchangeDiscovery([pubsubTopic]) ] - } + }, + shardInfo: shardInfo }); await waku.start();