From e17d5dd1dad4c895ef79204f4956e65f511341f8 Mon Sep 17 00:00:00 2001
From: benjamin <ben@elixxir.io>
Date: Mon, 3 Oct 2022 13:07:10 -0700
Subject: [PATCH] fixed a bug where round updates would come with bad data

---
 channels/sendTracker.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/channels/sendTracker.go b/channels/sendTracker.go
index 550844220..6a6c99c86 100644
--- a/channels/sendTracker.go
+++ b/channels/sendTracker.go
@@ -386,7 +386,7 @@ type roundResults struct {
 
 // callback is called when results are known about a round. it will re-trigger
 // the wait if it fails up to 'maxChecks' times.
-func (rr *roundResults) callback(allRoundsSucceeded, timedOut bool, _ map[id.Round]cmix.RoundResult) {
+func (rr *roundResults) callback(allRoundsSucceeded, timedOut bool, results map[id.Round]cmix.RoundResult) {
 
 	rr.st.mux.Lock()
 
@@ -434,8 +434,10 @@ func (rr *roundResults) callback(allRoundsSucceeded, timedOut bool, _ map[id.Rou
 	rr.st.mux.Unlock()
 
 	for i := range registered {
-		go rr.st.updateStatus(registered[i].UUID, registered[i].MsgID, time.Time{},
-			rounds.Round{}, status)
+		round := results[rr.round].Round
+		ts := mutateTimestamp(round.Timestamps[states.QUEUED], registered[i].MsgID)
+		go rr.st.updateStatus(registered[i].UUID, registered[i].MsgID, ts,
+			round, status)
 	}
 
 }
-- 
GitLab