From 753de21e2a9703682bca022d649cab549a610983 Mon Sep 17 00:00:00 2001 From: YashK Date: Fri, 30 Aug 2024 12:25:46 +0530 Subject: [PATCH] refactor: recorrected the comment for max buffer formula used --- cmd/config-utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/config-utils.go b/cmd/config-utils.go index f45a58b9..5ae3bfd1 100644 --- a/cmd/config-utils.go +++ b/cmd/config-utils.go @@ -424,7 +424,7 @@ func calculateMaxBufferPercent(stateBuffer, stateLength uint64) int32 { } // The formula is derived from the condition: - // 2(maxBuffer % stateBuffer) < (stateLength - 2*StateBuffer) + // 2(maxBuffer % stateLength) < (stateLength - 2*StateBuffer) // Perform the calculation with float64 for precision maxBufferPercent := 50 * (1 - (float64(2*stateBuffer) / float64(stateLength)))