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

Map Stake['state'] to relevant staking status #1950

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

iamacook
Copy link
Member

Summary

Resolves #1949

We currently determine the staking status based upon the estimated entry, exit and withdrawal times. Although this can be correct, it is inherently estimated and we have seen instances where the status of a particular staking transaction is incorrect.

This adjusts the status retrieval of deposit and exit requests to map the "earliest" validator states as the relevant status.

Changes

  • Validate expected Stake['state'] values.
  • Add StakingState <> StakingStatus mapping.
  • Add/update test coverage accordingly.

@iamacook iamacook requested a review from a team as a code owner September 24, 2024 09:55
@iamacook iamacook self-assigned this Sep 24, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11011404206

Details

  • 54 of 54 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 90.765%

Totals Coverage Status
Change from base Build 11008845779: 0.05%
Covered Lines: 8321
Relevant Lines: 8793

💛 - Coveralls

@hectorgomezv hectorgomezv added the in review Someone is reviewing this Pull Request label Sep 24, 2024
Copy link
Member

@hectorgomezv hectorgomezv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏻👏🏻

@hectorgomezv hectorgomezv removed the in review Someone is reviewing this Pull Request label Sep 24, 2024
@iamacook iamacook merged commit fa3c730 into main Sep 24, 2024
18 checks passed
@iamacook iamacook deleted the stakes-state-as-status branch September 24, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Estimated staking status inccorect
3 participants