fix test for nwaku master

This commit is contained in:
fryorcraken 2025-07-21 15:54:05 +10:00
parent 39c139158c
commit cd265ba1ae
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 8 additions and 4 deletions

View File

@ -76,6 +76,7 @@ export async function runNodes<T>(
} else if (isStaticSharding(networkConfig) && options.relayShards) {
const shards = options.relayShards;
nwakuArgs.shard = shards;
nwakuArgs.numShardsInNetwork = 0;
shards.map((shardId) =>
routingInfos.push(createRoutingInfo(networkConfig, { shardId }))

View File

@ -151,14 +151,15 @@ describe("Metadata Protocol", function () {
it("receiving a ping from a peer does not overwrite shard info", async function () {
const clusterId = 2;
const shards = [1];
const numShardsInCluster = 8;
const numShardsInCluster = 0; //static sharding
await nwaku1.start({
relay: true,
discv5Discovery: true,
peerExchange: true,
clusterId,
shard: shards
shard: shards,
numShardsInNetwork: numShardsInCluster
});
const nwaku1Ma = await nwaku1.getMultiaddrWithId();

View File

@ -138,7 +138,8 @@ describe("Waku Store, different static shards", function () {
store: true,
clusterId: StaticTestClusterId,
shard: [1],
relay: true
relay: true,
numShardsInNetwork: 0 // static sharding
});
// Set up and start a new nwaku node with Default Pubsubtopic
@ -147,7 +148,8 @@ describe("Waku Store, different static shards", function () {
store: true,
clusterId: StaticTestClusterId,
shard: [2],
relay: true
relay: true,
numShardsInNetwork: 0 // static sharding
});
const totalMsgs = 10;