Skip to content

Commit

Permalink
fix: more detailed logs to differentiate shards with peers (#2794)
Browse files Browse the repository at this point in the history
  • Loading branch information
darshankabariya committed Jun 10, 2024
1 parent 31bd6d7 commit 55a87d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion waku/node/peer_manager/peer_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ proc onPeerMetadata(pm: PeerManager, peerId: PeerId) {.async.} =
pm.peerStore.hasPeer(peerId, WakuRelayCodec) and
not metadata.shards.anyIt(pm.wakuMetadata.shards.contains(it))
):
reason = "no shards in common"
let myShardsString = "[ " & toSeq(pm.wakuMetadata.shards).join(", ") & "]"
let otherShardsString = "[ " & metadata.shards.join(", ") & "]"
reason =
"no shards in common: my_shards = " & myShardsString & " others_shards = " &
otherShardsString
break guardClauses

return
Expand Down

0 comments on commit 55a87d2

Please sign in to comment.