chore: improving logging under debugDiscv5 flag (#2899)

This commit is contained in:
gabrielmer 2024-07-15 10:55:31 +03:00 committed by GitHub
parent f54ba10bc7
commit 8578fb0c3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -665,8 +665,11 @@ proc connectToNodes*(
when defined(debugDiscv5):
let peerIds = connectedPeers.mapIt(it.peerId)
let origin = connectedPeers.mapIt(it.origin)
notice "established connections with found peers",
peerIds = peerIds, origin = origin
if peerIds.len > 0:
notice "established connections with found peers",
peerIds = peerIds.mapIt(shortLog(it)), origin = origin
else:
notice "could not connect to new peers", attempted = nodes.len
info "Finished dialing multiple peers",
successfulConns = connectedPeers.len, attempted = nodes.len