From 60418b4e360484b84a750513ef2ae98024bb394a Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Wed, 18 May 2022 12:43:46 -0500 Subject: [PATCH] improve historical handling to only take completed rounds --- network/rounds/historical.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/network/rounds/historical.go b/network/rounds/historical.go index c3b9b4b9b..85f53e0f3 100644 --- a/network/rounds/historical.go +++ b/network/rounds/historical.go @@ -13,6 +13,7 @@ import ( "gitlab.com/elixxir/client/stoppable" "gitlab.com/elixxir/client/storage/reception" pb "gitlab.com/elixxir/comms/mixmessages" + "gitlab.com/elixxir/primitives/states" "gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/primitives/id" "time" @@ -120,9 +121,9 @@ func (m *Manager) processHistoricalRounds(comm historicalRoundsComms, stop *stop // process the returned historical roundRequests. for i, roundInfo := range response.Rounds { // The interface has missing returns returned as nil, such roundRequests - // need be be removes as processing so the network follower will + // need to be removes as processing so the network follower will // pick them up in the future. - if roundInfo == nil { + if roundInfo == nil || roundInfo.State != uint32(states.COMPLETED) { var errMsg string roundRequests[i].numAttempts++ if roundRequests[i].numAttempts == m.params.MaxHistoricalRoundsRetries { -- GitLab