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 authored and rymnc committed Jun 20, 2024
1 parent ad3ad3b commit 13ecf7f
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 13ecf7f

Please sign in to comment.