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…
Reference in New Issue