Skip to content

Commit

Permalink
les: cosmetic rewrite of the arm64 float bug workaround (ethereum#21960)
Browse files Browse the repository at this point in the history
* les: revert arm float bug workaround to check go 1.15

* add traces to reproduce outside travis

* simpler workaround
  • Loading branch information
gballet authored and enriquefynn committed Feb 15, 2021
1 parent 9dc2e3f commit 58bb949
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions les/utils/expiredvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 58bb949

Please sign in to comment.