Skip to content
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

Create decimal.MulInt #2407

Closed
ValarDragon opened this issue Sep 26, 2018 · 0 comments · Fixed by #2408
Closed

Create decimal.MulInt #2407

ValarDragon opened this issue Sep 26, 2018 · 0 comments · Fixed by #2408

Comments

@ValarDragon
Copy link
Contributor

Summary

Within staking we often convert an sdk.Int to a sdk.Decimal, to just multiply it with another already known decimal. This is inefficient (as theres extra memory allocation, and the multiplication equation for 2 dec's is more complex than a dec * int), and instead we should just support the simpler / faster Decimal * Int operation as well. I propose the name "MulInt" for this operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant