mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 11:41:28 +00:00
parent
256d9042d3
commit
7c23625193
@ -1226,22 +1226,39 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
|
||||
.publish(Topic::from(topic.clone()), data)
|
||||
{
|
||||
Ok(_) => {
|
||||
warn!(self.log, "Gossip message published on retry"; "topic" => topic_str);
|
||||
if let Some(v) = metrics::get_int_counter(
|
||||
debug!(
|
||||
self.log,
|
||||
"Gossip message published on retry";
|
||||
"topic" => topic_str
|
||||
);
|
||||
metrics::inc_counter_vec(
|
||||
&metrics::GOSSIP_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||
&[topic_str],
|
||||
) {
|
||||
v.inc()
|
||||
};
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
warn!(self.log, "Gossip message publish failed on retry"; "topic" => topic_str, "error" => %e);
|
||||
if let Some(v) = metrics::get_int_counter(
|
||||
Err(PublishError::Duplicate) => {
|
||||
debug!(
|
||||
self.log,
|
||||
"Gossip message publish ignored on retry";
|
||||
"reason" => "duplicate",
|
||||
"topic" => topic_str
|
||||
);
|
||||
metrics::inc_counter_vec(
|
||||
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||
&[topic_str],
|
||||
) {
|
||||
v.inc()
|
||||
};
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
warn!(
|
||||
self.log,
|
||||
"Gossip message publish failed on retry";
|
||||
"topic" => topic_str,
|
||||
"error" => %e
|
||||
);
|
||||
metrics::inc_counter_vec(
|
||||
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||
&[topic_str],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user