Skip to content

Commit

Permalink
Align peer score metrics to main (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusKysel authored Nov 11, 2024
1 parent 5f79591 commit 7c8b076
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions network/topics/scoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ func scoreInspector(logger *zap.Logger,
}
gossipScoreIndex.SetScores(peerScores)

// Skip if it's not time to log yet.
if inspections%logFrequency != 0 {
inspections++
return
}
inspections++

// Reset metrics before updating them.
metrics.ResetPeerScores()

Expand Down Expand Up @@ -154,6 +147,11 @@ func scoreInspector(logger *zap.Logger,
// Short logs per topic https://github.com/ssvlabs/ssv/issues/1666
invalidMessagesStats := formatInvalidMessageStats(filtered)

if inspections%logFrequency != 0 {
// Don't log yet.
continue
}

// Log.
fields := []zap.Field{
fields.PeerID(pid),
Expand Down Expand Up @@ -185,6 +183,8 @@ func scoreInspector(logger *zap.Logger,
// zap.Any("scores", scores), zap.Any("topicScores", peerScores.Topics))
//}
}

inspections++
}
}

Expand Down

0 comments on commit 7c8b076

Please sign in to comment.