From 581c028d181cc4582c8435ced5c0b104ac63346f Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Mon, 7 Dec 2020 13:04:27 +0000 Subject: [PATCH] les: cosmetic rewrite of the arm64 float bug workaround (#21960) * les: revert arm float bug workaround to check go 1.15 * add traces to reproduce outside travis * simpler workaround --- les/utils/expiredvalue.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/les/utils/expiredvalue.go b/les/utils/expiredvalue.go index 55e82cee4..1a2b3d995 100644 --- a/les/utils/expiredvalue.go +++ b/les/utils/expiredvalue.go @@ -88,8 +88,9 @@ func (e *ExpiredValue) Add(amount int64, logOffset Fixed64) int64 { if base >= 0 || uint64(-base) <= e.Base { // This is a temporary fix to circumvent a golang // uint conversion issue on arm64, which needs to - // be investigated further. FIXME - e.Base = uint64(int64(e.Base) + int64(base)) + // be investigated further. More details at: + // https://github.com/golang/go/issues/43047 + e.Base += uint64(int64(base)) return amount } net := int64(-float64(e.Base) / factor)