Skip to content

Fix tests to not cast staked tokens amounts to int64 #7655

Closed
@sunnya97

Description

Summary of Bug

Currently the power reduction variable in the staking module is defaulted to 10^6.

However, if the smallest unit of a denom is very small such as 10^-18, then the number of tokens staked can be very high, making them not possible to be cast to an int64.

However, many of the staking tests incorrectly assume that number of staked tokens can be cast to int64, when this is not necessarily the case. These tests should be updated to not make this assumption. See example in this Straightedge branch here: v0.39.1...heystraightedge:powerreduction-18


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions