-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove another potential abort in staking_pool (#7571)
This showed up when stress unit testing delegation code with random amounts, random operations, etc. The rewards pool balance is 1 less than the rewards we are trying to withdraw, possibly due to rounding. The exact reason why this happened needs to be investigated. This PR removes the possibility of aborting at `balance::split` when withdrawing rewards from rewards pool. UPDATE: switching the order in which we process new delegations and delegation withdraws seems to fix the issue. It's still not super clear whether the original order was the only trigger of the abort though.
- Loading branch information
Showing
5 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters