-
Notifications
You must be signed in to change notification settings - Fork 14
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
test: fix staking precompile v2 test #639
Conversation
WalkthroughThe recent changes streamline test functions in the integration suite by removing unnecessary logging and enhancing code clarity. In Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- tests/crosschain_test.go (1 hunks)
- tests/staking_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
- tests/crosschain_test.go
Additional comments not posted (7)
tests/staking_test.go (7)
537-537
: Enhance readability with step comments.The numbered comment improves the readability and understanding of the test flow by clearly outlining the steps.
542-544
: Simplify initial delegation amount.The change to use a plain integer for
delBalance
instead of multiplying by a scaling factor simplifies the calculations and improves clarity.
556-557
: IntroducehalfDelegateAmount
for clarity.The introduction of
halfDelegateAmount
clarifies the intention behind the undelegation operation, making the code more understandable.
558-561
: Clarify undelegation logic.The explicit calculation of half of the
delBalance
and its use inUnDelegateV2
enhances clarity and reduces potential errors.
563-569
: Clarify redelegation process.The steps for creating a new validator and redelegating to it are clearly outlined, improving the readability and understanding of the test logic.
575-577
: Verify delegation amount for new validator.The check for the new validator's delegation amount ensures that the redelegation logic is correctly implemented.
579-584
: Finalize test with cleanup.The final block ensures that the new validator is cleared, maintaining test integrity and preventing side effects.
Summary by CodeRabbit
Bug Fixes
Refactor
Tests