-
Notifications
You must be signed in to change notification settings - Fork 198
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
delete delegator on claim rewards if needed #3509
Conversation
Codecov Report
@@ Coverage Diff @@
## development #3509 +/- ##
============================================
Coverage 73.88% 73.88%
============================================
Files 582 582
Lines 74549 74579 +30
============================================
+ Hits 55077 55105 +28
- Misses 15069 15071 +2
Partials 4403 4403
Continue to review full report at Codecov.
|
cmd/node/config/enableEpochs.toml
Outdated
@@ -135,6 +135,9 @@ | |||
# CorrectFirstQueuedEpoch represents the epoch when the backward compatibility for setting the first queued node is enabled | |||
CorrectFirstQueuedEpoch = 5 | |||
|
|||
# DeleteDelegatorAfterClaimRewardsEnableEpoch represents the epoch when the delegators data is deleted for delegators that have to claim rewards after they widrawal all funds | |||
DeleteDelegatorAfterClaimRewardsEnableEpoch = 1000000 |
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.
should be 6
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.
done.
4dbe1eb
cmd/node/config/enableEpochs.toml
Outdated
@@ -133,10 +133,10 @@ | |||
OptimizeGasUsedInCrossMiniBlocksEnableEpoch = 2 | |||
|
|||
# CorrectFirstQueuedEpoch represents the epoch when the backward compatibility for setting the first queued node is enabled | |||
CorrectFirstQueuedEpoch = 6 | |||
CorrectFirstQueuedEpoch = 5 |
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.
as these 2 will probably be set altogether, why not setting CorrectFirstQueuedEpoch
and DeleteDelegatorAfterClaimRewardsEnableEpoch
to 2?
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.
done.
# Conflicts: # config/epochConfig.go # node/nodeRunner.go
1f7ba9a
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.
080bbda
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.
Re-approved on system tests as only integration tests changed since latest review from @gabi-vuls.
Bug-fix: Fixed the situation when a delegator withdraws all his funds but the rewards remain. In this situation,
delegatorData
is not deleted because this user still has some rewards to claim.Now we have a check that will delete
delegatorData
also on theclaimRewards
function if needed.logLog
fortransferOwnership
function.