fix: increasing maxInboundStreams for lightpush from 32 to 100 (#2021)

* increasing maxInboundStreams for lightpush from 32 to 100

* allowing test to fail
This commit is contained in:
gabrielmer 2024-05-30 10:28:50 +02:00 committed by GitHub
parent e49e7289ae
commit 2311a595b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 19 deletions

View File

@ -48,9 +48,13 @@ export class FilterCore extends BaseProtocol implements IBaseProtocolCore {
options
);
libp2p.handle(FilterCodecs.PUSH, this.onRequest.bind(this)).catch((e) => {
log.error("Failed to register ", FilterCodecs.PUSH, e);
});
libp2p
.handle(FilterCodecs.PUSH, this.onRequest.bind(this), {
maxInboundStreams: 100
})
.catch((e) => {
log.error("Failed to register ", FilterCodecs.PUSH, e);
});
}
private onRequest(streamData: IncomingStreamData): void {

View File

@ -262,23 +262,15 @@ describe("Waku Filter V2: Subscribe: Single Service Node", function () {
});
}
// Open issue here: https://github.com/waku-org/js-waku/issues/1790
// That's why we use the try catch block
try {
// Verify that each message was received on the corresponding topic.
expect(await messageCollector.waitForMessages(topicCount)).to.eq(true);
td.contentTopics.forEach((topic, index) => {
messageCollector.verifyReceivedMessage(index, {
expectedContentTopic: topic,
expectedMessageText: `Message for Topic ${index + 1}`,
expectedPubsubTopic: TestPubsubTopic
});
// Verify that each message was received on the corresponding topic.
expect(await messageCollector.waitForMessages(topicCount)).to.eq(true);
td.contentTopics.forEach((topic, index) => {
messageCollector.verifyReceivedMessage(index, {
expectedContentTopic: topic,
expectedMessageText: `Message for Topic ${index + 1}`,
expectedPubsubTopic: TestPubsubTopic
});
} catch (error) {
console.warn(
"This test still fails because of https://github.com/waku-org/js-waku/issues/1790"
);
}
});
});
it("Error when try to subscribe to more than 101 topics (new limit)", async function () {