mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi: Work around the uin64 conversion issue
This commit is contained in:
parent
47d0a8c409
commit
8054a68300
2 changed files with 7 additions and 2 deletions
|
|
@ -92,7 +92,10 @@ func (e *ExpiredValue) Add(amount int64, logOffset Fixed64) int64 {
|
||||||
e.Exp = integer
|
e.Exp = integer
|
||||||
}
|
}
|
||||||
if base >= 0 || uint64(-base) <= e.Base {
|
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
|
return amount
|
||||||
}
|
}
|
||||||
net := int64(-float64(e.Base) / factor)
|
net := int64(-float64(e.Base) / factor)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@
|
||||||
|
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
func TestValueExpiration(t *testing.T) {
|
func TestValueExpiration(t *testing.T) {
|
||||||
var cases = []struct {
|
var cases = []struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue