chore: update protocol health for lightpush

This commit is contained in:
Danish Arora 2024-10-09 12:10:39 +05:30
parent 829d1834c1
commit e84eb620f7
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,10 @@
import type { Peer, PeerId } from "@libp2p/interface";
import { ConnectionManager, LightPushCodec, LightPushCore } from "@waku/core";
import {
ConnectionManager,
getHealthManager,
LightPushCodec,
LightPushCore
} from "@waku/core";
import {
Failure,
type IEncoder,
@ -113,6 +118,11 @@ class LightPush extends BaseProtocolSDK implements ILightPush {
}
}
getHealthManager().updateProtocolHealth(
this.protocol.multicodec,
successes.length
);
return {
successes,
failures

View File

@ -17,7 +17,7 @@ import {
const NUM_NODES = [0, 1, 2, 3];
describe("Health Manager", function () {
describe.only("Health Manager", function () {
this.timeout(10_000);
let waku: LightNode;