Skip to content

Commit

Permalink
Do not log zero sync committee messages (#13662)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka authored Feb 26, 2024
1 parent ddb321e commit d9d2ee7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions validator/client/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit d9d2ee7

Please sign in to comment.