From 0a5bb75d4de97f8872b96ba6daa070cf26715409 Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Wed, 5 Jan 2022 13:15:07 -0600 Subject: [PATCH] bring back some changes --- api/results.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/api/results.go b/api/results.go index 8d164d728..94e2ba801 100644 --- a/api/results.go +++ b/api/results.go @@ -156,7 +156,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, // Skip if the round is nil (unknown from historical rounds) // they default to timed out, so correct behavior is preserved - if roundReport.RoundInfo == nil || roundReport.TimedOut { + if roundReport.TimedOut { allRoundsSucceeded = false } else { // If available, denote the result @@ -207,8 +207,16 @@ func (c *Client) getHistoricalRounds(msg *pb.HistoricalRounds, // Service historical rounds, sending back to the caller thread for _, ri := range resp.Rounds { - sendResults <- ds.EventReturn{ - RoundInfo: ri, + if ri == nil { + // Handle unknown by historical rounds + sendResults <- ds.EventReturn{ + RoundInfo: &pb.RoundInfo{ID: msg.Rounds[i]}, + TimedOut: true, + } + } else { + sendResults <- ds.EventReturn{ + RoundInfo: ri, + } } } } -- GitLab