Skip to content

Commit

Permalink
Include emply slice
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Aug 29, 2024
1 parent 0d6dbf2 commit faf80a1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions snow/networking/handler/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func (h *handler) HealthCheck(ctx context.Context) (interface{}, error) {
func (h *handler) networkHealthCheck() (interface{}, error) {
percentConnected := h.peerTracker.ConnectedPercent()
details := map[string]interface{}{
"percentConnected": percentConnected,
"percentConnected": percentConnected,
"disconnectedValidators": h.getDisconnectedValidators(),
}

var err error
Expand All @@ -57,11 +58,6 @@ func (h *handler) networkHealthCheck() (interface{}, error) {
)
}

disconnectedVdrs := h.getDisconnectedValidators()
if disconnectedVdrs.Len() > 0 {
details["disconnectedValidators"] = disconnectedVdrs
}

return details, err
}

Expand Down

0 comments on commit faf80a1

Please sign in to comment.