Skip to content

Conversation

@juliaaschmidt
Copy link
Contributor

This pull request adds new tests to improve coverage of validator removal scenarios in the stake pool program. The tests ensure correct handling when removing validators, particularly those with transient stake, and verify that stake decrease operations fail as expected after removal.

Validator removal and stake deactivation logic:

  • Added a test to verify that removing a validator with both active and transient stake correctly updates the validator's status to DeactivatingAll and triggers deactivation of both stake accounts. This ensures the pool handles stake transitions safely when a validator is removed.

Decrease stake error handling:

  • Added parameterized tests to confirm that attempting to decrease stake on a validator marked for removal fails with a ValidatorNotFound error, covering all relevant decrease instruction types. This guards against unauthorized stake changes after validator removal.

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.

1 participant