Skip to content

Commit

Permalink
chore: update protocol health for lightpush
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Oct 9, 2024
1 parent 829d183 commit e84eb62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion packages/sdk/src/protocols/light_push/light_push.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -113,6 +118,11 @@ class LightPush extends BaseProtocolSDK implements ILightPush {
}
}

getHealthManager().updateProtocolHealth(
this.protocol.multicodec,
successes.length
);

return {
successes,
failures
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/tests/health-manager/protocols.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e84eb62

Please sign in to comment.