all: get rid of custom MaxUint64 and MaxUint64 #30636
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our own
common/math
package had MaxInt64 and MaxUint64 redeclared. A bunch of code throughout go-ethereum used these instead of the stdlibmath
variants. This is bad because it introduces a pointless dependency from various packages tocommon
(common/math
depends oncommon
, different story to break).Either way, whilst it may be nice to write
math.MaxUint64
from code where we also mess withmath.MaxBig
and other methods, it's really to little of a nicety gain for messing up dependencies. This PR removes these constants and just points all user code to stdlib math instead.