Skip to content

Commit

Permalink
debug: fixing peer exchange tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Apr 17, 2024
1 parent e5e8cd5 commit 3652df2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/tests/tests/peer-exchange/pe.optional.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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();
Expand Down

0 comments on commit 3652df2

Please sign in to comment.