Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Jan 24, 2024
1 parent 752fe50 commit 1fc77db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/lib/base_protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DEFAULT_NUM_PEERS_TO_USE = 3;
export class BaseProtocol implements IBaseProtocol {
public readonly addLibp2pEventListener: Libp2p["addEventListener"];
public readonly removeLibp2pEventListener: Libp2p["removeEventListener"];
readonly numPeersTouse: number;
readonly numPeersToUse: number;
protected streamManager: StreamManager;
protected pubsubTopics: PubsubTopic[];

Expand All @@ -38,7 +38,7 @@ export class BaseProtocol implements IBaseProtocol {
) {
this.pubsubTopics = this.initializePubsubTopic(options);

this.numPeersTouse = options?.numPeersToUse ?? DEFAULT_NUM_PEERS_TO_USE;
this.numPeersToUse = options?.numPeersToUse ?? DEFAULT_NUM_PEERS_TO_USE;

this.addLibp2pEventListener = components.events.addEventListener.bind(
components.events
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/filter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class Filter extends BaseProtocol implements IReceiver {

const peers = await this.getPeers({
maxBootstrapPeers: 1,
numPeers: this.numPeersTouse
numPeers: this.numPeersToUse
});
if (peers.length === 0) {
throw new Error("No peer found to initiate subscription.");
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/light_push/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class LightPush extends BaseProtocol implements ILightPush {

const peers = await this.getPeers({
maxBootstrapPeers: 1,
numPeers: this.numPeersTouse
numPeers: this.numPeersToUse
});

if (!peers.length) {
Expand Down

0 comments on commit 1fc77db

Please sign in to comment.