fix: more detailed logs to differentiate shards with peers (#2794)

This commit is contained in:
Darshan K 2024-06-10 13:40:18 +05:30 committed by GitHub
parent 31bd6d71c0
commit 55a87d21d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -380,7 +380,11 @@ proc onPeerMetadata(pm: PeerManager, peerId: PeerId) {.async.} =
pm.peerStore.hasPeer(peerId, WakuRelayCodec) and pm.peerStore.hasPeer(peerId, WakuRelayCodec) and
not metadata.shards.anyIt(pm.wakuMetadata.shards.contains(it)) 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 break guardClauses
return return