mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-11 13:34:26 +00:00
add more diagnostics when gossip publish fails
This commit is contained in:
parent
d9563d65ae
commit
fff54fa23c
@ -520,7 +520,10 @@ method publish*(g: GossipSub,
|
||||
g.lastFanoutPubSub[topic] = Moment.fromNow(g.parameters.fanoutTTL)
|
||||
|
||||
if peers.len == 0:
|
||||
notice "No peers for topic, skipping publish"
|
||||
let topicPeers = g.gossipsub.getOrDefault(topic).toSeq()
|
||||
notice "No peers for topic, skipping publish", peersOnTopic = topicPeers.len,
|
||||
connectedPeers = topicPeers.filterIt(it.connected).len,
|
||||
topic
|
||||
# skipping topic as our metrics finds that heavy
|
||||
libp2p_gossipsub_failed_publish.inc()
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user