From 7601ec4b31f8bda41e3770dd59fbe8b6d04942e1 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Fri, 24 Sep 2021 17:21:18 +0000
Subject: [PATCH] Comments and debugs

---
 interfaces/utility/trackResults.go | 2 ++
 network/health/tracker.go          | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/interfaces/utility/trackResults.go b/interfaces/utility/trackResults.go
index cd766624d..a02f1e0e4 100644
--- a/interfaces/utility/trackResults.go
+++ b/interfaces/utility/trackResults.go
@@ -8,6 +8,7 @@
 package utility
 
 import (
+	jww "github.com/spf13/jwalterweatherman"
 	ds "gitlab.com/elixxir/comms/network/dataStructures"
 	"gitlab.com/elixxir/primitives/states"
 )
@@ -22,6 +23,7 @@ func TrackResults(resultsCh chan ds.EventReturn, numResults int) (bool, int, int
 		if er.TimedOut {
 			numTimeOut++
 		} else if states.Round(er.RoundInfo.State) == states.FAILED {
+			jww.ERROR.Printf("RoundInfo FAILED: %+v", er.RoundInfo)
 			numRoundFail++
 		}
 	}
diff --git a/network/health/tracker.go b/network/health/tracker.go
index 1cc4be54e..8be8c05ff 100644
--- a/network/health/tracker.go
+++ b/network/health/tracker.go
@@ -177,6 +177,9 @@ func (t *Tracker) start(stop *stoppable.Single) {
 
 			return
 		case heartbeat = <-t.heartbeat:
+			// FIXME: There's no transition to unhealthy here
+			// and there needs to be after some number of bad
+			// polls
 			if healthy(heartbeat) {
 				t.setHealth(true)
 			}
-- 
GitLab