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) { } 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 }))

View File

@ -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();

View File

@ -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;