accounts/abi: Work around the uin64 conversion issue

This commit is contained in:
Guillaume Ballet 2020-04-14 11:24:18 +02:00
parent 47d0a8c409
commit 8054a68300
2 changed files with 7 additions and 2 deletions

View file

@ -92,7 +92,10 @@ func (e *ExpiredValue) Add(amount int64, logOffset Fixed64) int64 {
e.Exp = integer
}
if base >= 0 || uint64(-base) <= e.Base {
e.Base += uint64(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))
return amount
}
net := int64(-float64(e.Base) / factor)

View file

@ -16,7 +16,9 @@
package utils
import "testing"
import (
"testing"
)
func TestValueExpiration(t *testing.T) {
var cases = []struct {