Closed eddiewang closed 6 years ago
this makes me think that parsing as an int is probably the wrong thing to do. It wouldn't surprise me if a user assumed they could pass ^types.BlockHeight(0)
. Perhaps instead we should parse as a uint and check explicitly for FormValue("endheight") == "-1"
.
Heh, do we want to make that change? I feel like it's the better choice as well.
Heights are always uint64, we should probably be checking the form value for a violation and then cleaning it up api-package side
@DavidVorick Nope, we don't. That's why we already changed it in a new PR :P
Changes
math.MaxUint64
tomath.MaxInt64
so that the handler does not overflow when running parseInt on the end height.This bug showed up due to merging PR #3097 - which is a necessary modification to maintain
-1
api compatibility with older versions of Sia-UI.