Skip to content

Commit

Permalink
chore: remove unused member from SyncApi (#794)
Browse files Browse the repository at this point in the history
This change should have no impact on functionality.

`SyncApi`'s `#peerIds` member was written but never read. This removes
it.
  • Loading branch information
EvanHahn authored Aug 29, 2024
1 parent 53732d9 commit 1ee7803
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/sync/sync-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ export class SyncApi extends TypedEmitter {
#peerSyncControllers = new Map()
/** @type {Map<string, PeerSyncController>} */
#pscByPeerId = new Map()
/** @type {Set<string>} */
#peerIds = new Set()
#wantsToSyncData = false
#hasRequestedFullStop = false
/** @type {SyncEnabledState} */
Expand Down Expand Up @@ -373,7 +371,6 @@ export class SyncApi extends TypedEmitter {
})
this.#peerSyncControllers.set(protomux, peerSyncController)
this.#pscByPeerId.set(peerSyncController.peerId, peerSyncController)
this.#peerIds.add(peerSyncController.peerId)

// Add peer to all core states (via namespace sync states)
this[kSyncState].addPeer(peerSyncController.peerId)
Expand Down Expand Up @@ -409,7 +406,6 @@ export class SyncApi extends TypedEmitter {
this.#peerSyncControllers.delete(protomux)
const peerId = keyToId(peer.remotePublicKey)
this.#pscByPeerId.delete(peerId)
this.#peerIds.delete(peerId)
this.#pendingDiscoveryKeys.delete(protomux)
}

Expand Down

0 comments on commit 1ee7803

Please sign in to comment.