From faf80a1f33e2ca0ade804e942f0a25395dfda86e Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Thu, 29 Aug 2024 14:08:15 -0400 Subject: [PATCH] Include emply slice --- snow/networking/handler/health.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/snow/networking/handler/health.go b/snow/networking/handler/health.go index cc3177e6b541..0dbcb844fb95 100644 --- a/snow/networking/handler/health.go +++ b/snow/networking/handler/health.go @@ -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 @@ -57,11 +58,6 @@ func (h *handler) networkHealthCheck() (interface{}, error) { ) } - disconnectedVdrs := h.getDisconnectedValidators() - if disconnectedVdrs.Len() > 0 { - details["disconnectedValidators"] = disconnectedVdrs - } - return details, err }