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

79 switching the validator choice without interrupting the staking process #26

Conversation

Vitomir2
Copy link
Contributor

@Vitomir2 Vitomir2 commented Jun 5, 2024

  • new function to swap a delegated position;
  • create a new function isBalanceChangeThresholdExceeded in order to check for the maximum amount of swaps (balance changes) allowed;
  • new findTopUpIndex, getClosestMaturedTimestamp, and hasMatured functions for the tests;
  • adapt the tests, skip the top-up ones by adding todo comments to delete, and add some additional ones to cover cases;

SamBorisov and others added 3 commits June 5, 2024 15:52
fix bugs and optimize the swap function for the vested delegations;
create new function isBalanceChangeThresholdExceeded in order to check for the max amount of swaps (balance changes) allowed;
new findTopUpIndex, getClosestMaturedTimestamp and hasMatured functions for the tests;
adapt the tests, skip the top-up ones with adding todo comment to delete, and add some additional ones to cover cases;
@Vitomir2 Vitomir2 requested a review from R-Santev June 5, 2024 13:01
Vitomir2 and others added 4 commits June 5, 2024 16:02
add more checks in the swap function to avoid some attack vectors;
create a separate function to check if the new position is available and revert with general error;
delete the top-up tests;
cover the new checks in the tests;
@Vitomir2 Vitomir2 merged commit ab64b58 into main Jun 6, 2024
1 of 7 checks passed
@Vitomir2 Vitomir2 deleted the 79-switching-the-validator-choice-without-interrupting-the-staking-process branch June 6, 2024 12:59
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.

3 participants