Skip to content

Commit

Permalink
add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Jan 12, 2024
1 parent aba6559 commit 7f2222e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,8 @@ contract Staking is IStaking, System, IParamSubscriber, IApplication {
pendingUndelegateTime[recipient][validator] = 0;
undelegated[recipient] = undelegated[recipient].add(amount);

// this is to address the issue that the contract state will not being updated
// when the Beacon Chain system undelegate all the funds after second sunset upgrade
if (isAutoUndelegate) {
delegated[recipient] = delegated[recipient].sub(amount);
delegatedOfValidator[recipient][validator] = delegatedOfValidator[recipient][validator].sub(amount);
Expand Down

0 comments on commit 7f2222e

Please sign in to comment.