Skip to content

Create decimal.MulInt #2407

@ValarDragon

Description

@ValarDragon

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions