From 7e39889f6d0016bcf3b9cb6e174b647fd3ceb33f Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Sat, 8 Jan 2022 09:23:32 -0800 Subject: [PATCH] fixed a compile error --- network/rounds/unchecked.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network/rounds/unchecked.go b/network/rounds/unchecked.go index 8e00ce7cc..937eb5ab5 100644 --- a/network/rounds/unchecked.go +++ b/network/rounds/unchecked.go @@ -28,7 +28,7 @@ const ( trySix = 24 * time.Hour // Amount of tries past which the // backoff will not increase - cappedTries = 6 + cappedTries = 7 ) var backOffTable = [cappedTries]time.Duration{tryZero, tryOne, tryTwo, tryThree, tryFour, tryFive, trySix} @@ -115,8 +115,8 @@ func (m *Manager) processUncheckedRounds(checkInterval time.Duration, backoffTab func isRoundCheckDue(tries uint64, ts time.Time, backoffTable [cappedTries]time.Duration) bool { now := netTime.Now() - if tries > cappedTries { - tries = cappedTries + if tries > uint64(len(backoffTable)) { + tries = uint64(len(backoffTable)) } roundCheckTime := ts.Add(backoffTable[tries]) -- GitLab