Do not log zero sync committee messages (#13662)

This commit is contained in:
Radosław Kapka 2024-02-26 18:57:26 +01:00 committed by GitHub
parent ddb321e0ce
commit d9d2ee75de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,9 @@ func (v *validator) LogSubmittedAtts(slot primitives.Slot) {
// LogSubmittedSyncCommitteeMessages logs info about submitted sync committee messages.
func (v *validator) LogSubmittedSyncCommitteeMessages() {
log.WithField("messages", v.syncCommitteeStats.totalMessagesSubmitted).Debug("Submitted sync committee messages successfully to beacon node")
// Reset the amount.
atomic.StoreUint64(&v.syncCommitteeStats.totalMessagesSubmitted, 0)
if v.syncCommitteeStats.totalMessagesSubmitted > 0 {
log.WithField("messages", v.syncCommitteeStats.totalMessagesSubmitted).Debug("Submitted sync committee messages successfully to beacon node")
// Reset the amount.
atomic.StoreUint64(&v.syncCommitteeStats.totalMessagesSubmitted, 0)
}
}