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

fix: include peer id in autodial log message #2075

Merged
merged 1 commit into from
Sep 23, 2023
Merged
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: 4 additions & 4 deletions packages/libp2p/src/connection-manager/auto-dial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ export class AutoDial implements Startable {
(peer) => {
// Remove peers without addresses
if (peer.addresses.length === 0) {
log.trace('not autodialing %p because they have no addresses')
log.trace('not autodialing %p because they have no addresses', peer.id)
return false
}

// remove peers we are already connected to
if (connections.has(peer.id)) {
log.trace('not autodialing %p because they are already connected')
log.trace('not autodialing %p because they are already connected', peer.id)
return false
}

// remove peers we are already dialling
if (dialQueue.has(peer.id)) {
log.trace('not autodialing %p because they are already being dialed')
log.trace('not autodialing %p because they are already being dialed', peer.id)
return false
}

// remove peers already in the autodial queue
if (this.queue.hasJob(peer.id)) {
log.trace('not autodialing %p because they are already being autodialed')
log.trace('not autodialing %p because they are already being autodialed', peer.id)
return false
}

Expand Down
Loading