mirror of https://github.com/waku-org/js-waku.git
debug: fixing peer exchange tests (#1990)
Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
This commit is contained in:
parent
f3627c46a4
commit
1562f0fd6f
|
@ -5,7 +5,11 @@ import {
|
||||||
} from "@waku/core/lib/predefined_bootstrap_nodes";
|
} from "@waku/core/lib/predefined_bootstrap_nodes";
|
||||||
import { wakuPeerExchangeDiscovery } from "@waku/discovery";
|
import { wakuPeerExchangeDiscovery } from "@waku/discovery";
|
||||||
import type { LightNode } from "@waku/interfaces";
|
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 { expect } from "chai";
|
||||||
|
|
||||||
import { afterEachCustom, tearDownNodes } from "../../src";
|
import { afterEachCustom, tearDownNodes } from "../../src";
|
||||||
|
@ -28,13 +32,17 @@ describe("Peer Exchange", () => {
|
||||||
this.timeout(50_000);
|
this.timeout(50_000);
|
||||||
const predefinedNodes = getPredefinedBootstrapNodes(name, nodes);
|
const predefinedNodes = getPredefinedBootstrapNodes(name, nodes);
|
||||||
|
|
||||||
|
const singleShardInfo = { clusterId: 1, shard: 1 };
|
||||||
|
const shardInfo = singleShardInfosToShardInfo([singleShardInfo]);
|
||||||
|
const pubsubTopic = singleShardInfoToPubsubTopic(singleShardInfo);
|
||||||
waku = await createLightNode({
|
waku = await createLightNode({
|
||||||
libp2p: {
|
libp2p: {
|
||||||
peerDiscovery: [
|
peerDiscovery: [
|
||||||
bootstrap({ list: predefinedNodes }),
|
bootstrap({ list: predefinedNodes }),
|
||||||
wakuPeerExchangeDiscovery([DefaultPubsubTopic])
|
wakuPeerExchangeDiscovery([pubsubTopic])
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
shardInfo: shardInfo
|
||||||
});
|
});
|
||||||
|
|
||||||
await waku.start();
|
await waku.start();
|
||||||
|
|
Loading…
Reference in New Issue