chore: change amount of used peers to 2 (#2111)

* chore: change amount of used peers to 2

* up

* up

* up tests
This commit is contained in:
Sasha 2024-08-27 21:53:16 +02:00 committed by GitHub
parent f0a5c6f056
commit 71384dfdfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ interface Options {
}
const RENEW_TIME_LOCK_DURATION = 30 * 1000;
const DEFAULT_NUM_PEERS_TO_USE = 3;
const DEFAULT_NUM_PEERS_TO_USE = 2;
const DEFAULT_MAINTAIN_PEERS_INTERVAL = 30_000;
export class BaseProtocolSDK implements IBaseProtocolSDK {

View File

@ -23,7 +23,7 @@ export async function runMultipleNodes(
networkConfig: NetworkConfig = DefaultNetworkConfig,
customArgs?: Args,
strictChecking: boolean = false,
numServiceNodes = 3,
numServiceNodes = 2,
withoutFilter = false
): Promise<[ServiceNodesFleet, LightNode]> {
// create numServiceNodes nodes

View File

@ -51,7 +51,7 @@ const runTests = (strictCheckNodes: boolean): void => {
});
it("Subscribe and receive messages via lightPush", async function () {
expect(waku.libp2p.getConnections()).has.length(3);
expect(waku.libp2p.getConnections()).has.length(2);
await waku.filter.subscribe(
[TestDecoder],

View File

@ -23,7 +23,7 @@ import {
} from "./utils.js";
const runTests = (strictNodeCheck: boolean): void => {
const numServiceNodes = 3;
const numServiceNodes = 2;
describe(`Waku Light Push: Multiple Nodes: Strict Check: ${strictNodeCheck}`, function () {
// Set the timeout for all tests in this suite. Can be overwritten at test level
this.timeout(15000);