New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go-kosu: update scaling methods to be consistent #243
Merged
+13
−10
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4fe6611
go-kosu: use pointer types in poster limit
hrharder cf6a4b2
go-kosu: update scaleBalance to not use Rat
hrharder dfaf411
go-kosu: fix copy of big.Ints
hrharder 8a916aa
go-kosu: re-add gosec lint skip
hrharder 9c82c07
go-kosu: update overflow check for consistency
hrharder 92364bc
Merge branch 'master' into refactor/go-kosu/consistent-int-scaling
gchaincl c36d07a
Merge branch 'master' into refactor/go-kosu/consistent-int-scaling
gchaincl File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
Loading status checks…
go-kosu: update overflow check for consistency
- Loading branch information
hrharder
committed
Aug 28, 2019
hrharder
Henry Harder
commit 9c82c0793c157109b3dbc13e4f4346d3a0fa770a
Verified
This commit was signed with a verified signature.
GPG key ID: 3E4EB305434EC58E
Learn about signing commits
| @@ -112,8 +112,8 @@ func scaleBalance(balance *big.Int) int64 { | ||
| ether.Exp(big.NewInt(10), big.NewInt(18), big.NewInt(0)) | ||
| scaled.Div(balance, ether) | ||
|
|
||
| if scaled.IsInt64() { | ||
| return scaled.Int64() | ||
| if !scaled.IsInt64() { | ||
| return math.MaxInt64 | ||
|
This conversation was marked as resolved
by gchaincl
hrharder
Author
Member
|
||
| } | ||
| return math.MaxInt64 | ||
| return scaled.Int64() | ||
| } | ||
ProTip!
Use n and p to navigate between commits in a pull request.
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.
what are the implications of this?