Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
chore: update lock
  • Loading branch information
danisharora099 committed Sep 27, 2024
1 parent f02581f commit 8291f4d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/core/src/lib/base_protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class BaseProtocol implements IBaseProtocolCore {

protected constructor(
public multicodec: string,
private components: Libp2pComponents,
protected components: Libp2pComponents,
private log: Logger,
public readonly pubsubTopics: PubsubTopic[]
) {
Expand Down Expand Up @@ -52,9 +52,9 @@ export class BaseProtocol implements IBaseProtocolCore {
* the class protocol. Waku may or may not be currently connected to these
* peers.
*/
// public async allPeers(): Promise<Peer[]> {
// return getPeersForProtocol(this.peerStore, [this.multicodec]);
// }
public async allPeers(): Promise<Peer[]> {
return getPeersForProtocol(this.components.peerStore, [this.multicodec]);
}

public async connectedPeers(withOpenStreams = false): Promise<Peer[]> {

Check failure on line 59 in packages/core/src/lib/base_protocol.ts

View workflow job for this annotation

GitHub Actions / proto

'withOpenStreams' is assigned a value but never used
const peers = await this.allPeers();
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/metadata/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Metadata extends BaseProtocol implements IMetadata {
pubsubTopicsToShardInfo(this.pubsubTopics)
);

const peer = await this.peerStore.get(peerId);
const peer = await this.libp2pComponents.peerStore.get(peerId);
if (!peer) {
return {
shardInfo: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/discovery/src/peer-exchange/waku_peer_exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class WakuPeerExchange extends BaseProtocol implements IPeerExchange {
numPeers: BigInt(numPeers)
});

const peer = await this.peerStore.get(peerId);
const peer = await this.components.peerStore.get(peerId);
if (!peer) {
return {
peerInfos: null,
Expand Down

0 comments on commit 8291f4d

Please sign in to comment.