mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 00:33:12 +00:00
fix test for nwaku master
This commit is contained in:
parent
39c139158c
commit
cd265ba1ae
@ -76,6 +76,7 @@ export async function runNodes<T>(
|
|||||||
} else if (isStaticSharding(networkConfig) && options.relayShards) {
|
} else if (isStaticSharding(networkConfig) && options.relayShards) {
|
||||||
const shards = options.relayShards;
|
const shards = options.relayShards;
|
||||||
nwakuArgs.shard = shards;
|
nwakuArgs.shard = shards;
|
||||||
|
nwakuArgs.numShardsInNetwork = 0;
|
||||||
|
|
||||||
shards.map((shardId) =>
|
shards.map((shardId) =>
|
||||||
routingInfos.push(createRoutingInfo(networkConfig, { shardId }))
|
routingInfos.push(createRoutingInfo(networkConfig, { shardId }))
|
||||||
|
|||||||
@ -151,14 +151,15 @@ describe("Metadata Protocol", function () {
|
|||||||
it("receiving a ping from a peer does not overwrite shard info", async function () {
|
it("receiving a ping from a peer does not overwrite shard info", async function () {
|
||||||
const clusterId = 2;
|
const clusterId = 2;
|
||||||
const shards = [1];
|
const shards = [1];
|
||||||
const numShardsInCluster = 8;
|
const numShardsInCluster = 0; //static sharding
|
||||||
|
|
||||||
await nwaku1.start({
|
await nwaku1.start({
|
||||||
relay: true,
|
relay: true,
|
||||||
discv5Discovery: true,
|
discv5Discovery: true,
|
||||||
peerExchange: true,
|
peerExchange: true,
|
||||||
clusterId,
|
clusterId,
|
||||||
shard: shards
|
shard: shards,
|
||||||
|
numShardsInNetwork: numShardsInCluster
|
||||||
});
|
});
|
||||||
|
|
||||||
const nwaku1Ma = await nwaku1.getMultiaddrWithId();
|
const nwaku1Ma = await nwaku1.getMultiaddrWithId();
|
||||||
|
|||||||
@ -138,7 +138,8 @@ describe("Waku Store, different static shards", function () {
|
|||||||
store: true,
|
store: true,
|
||||||
clusterId: StaticTestClusterId,
|
clusterId: StaticTestClusterId,
|
||||||
shard: [1],
|
shard: [1],
|
||||||
relay: true
|
relay: true,
|
||||||
|
numShardsInNetwork: 0 // static sharding
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set up and start a new nwaku node with Default Pubsubtopic
|
// Set up and start a new nwaku node with Default Pubsubtopic
|
||||||
@ -147,7 +148,8 @@ describe("Waku Store, different static shards", function () {
|
|||||||
store: true,
|
store: true,
|
||||||
clusterId: StaticTestClusterId,
|
clusterId: StaticTestClusterId,
|
||||||
shard: [2],
|
shard: [2],
|
||||||
relay: true
|
relay: true,
|
||||||
|
numShardsInNetwork: 0 // static sharding
|
||||||
});
|
});
|
||||||
|
|
||||||
const totalMsgs = 10;
|
const totalMsgs = 10;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user