Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused LocalDiscovery members #814

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/discovery/local-discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ export class LocalDiscovery extends TypedEmitter {
})
}

get publicKey() {
return this.#identityKeypair.publicKey
}

/** @returns {Promise<{ name: string, port: number }>} */
async start() {
await this.#sm.start()
Expand Down Expand Up @@ -256,10 +252,6 @@ export class LocalDiscovery extends TypedEmitter {
this.emit('connection', conn)
}

get connections() {
return this.#noiseConnections.values()
}

/**
* Close all servers and stop multicast advertising and browsing. Will wait
* for open sockets to close unless opts.force=true in which case open sockets
Expand Down
2 changes: 1 addition & 1 deletion tests/discovery/local-discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async function testMultiple(t, { period, nPeers = 20 }) {
for (let i = 0; i < nPeers; i++) {
const identityKeypair = new KeyManager(randomBytes(16)).getIdentityKeypair()
const discovery = new LocalDiscovery({ identityKeypair })
const peerId = keyToPublicId(discovery.publicKey)
const peerId = keyToPublicId(identityKeypair.publicKey)
peersById.set(peerId, discovery)
/** @type {OpenedNoiseStream[]} */
const conns = []
Expand Down
Loading