-
Notifications
You must be signed in to change notification settings - Fork 61
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
Test for RemoveZoneAndAssociatedRecords #678
Test for RemoveZoneAndAssociatedRecords #678
Conversation
Codecov Report
@@ Coverage Diff @@
## main #678 +/- ##
==========================================
+ Coverage 14.39% 14.44% +0.05%
==========================================
Files 243 243
Lines 63127 63133 +6
==========================================
+ Hits 9089 9122 +33
+ Misses 53286 53255 -31
- Partials 752 756 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Can we also check for validators / receipts / withdrawal records etc. by zone to ensure that everything that should have been cleaned up has been? thankjs, |
Ok |
@joe-bowman
Additional: |
Validators should definitely be removed if a zone is removed. Can you make a fix for this, please? Validator storage changed in v1.4 and the deletion of validators for a given zone was almost certainly overlooked. |
Also probably a good time to refactor: k.IterateAllDelegations(ctx, zone, func(delegation types.Delegation) (stop bool) { to take chainID instead of zone (all three methods only make use of zone.ChainID internally anyway!) but allows us to assert the removal properly. This also ensures the signatures are consistent with the other types (withdrawals, unbonding and redelegation records), and allows us to remove the unnecessary IterateZones call in the function being tested! |
Okay, |
For checks delegation and performance delegation records, I need to wait for the pull #748 to be merged |
I need to merge this PR #758 first, please review it |
Ok, done. @ThanhNhann @joe-bowman |
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.
Nice works @DongLieu !
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.
lgtm
1. Summary
Fixes #617
2.Type of change
3. Implementation details
4. How to test/use
5. Checklist
6. Limitations (optional)
7. Future Work (optional)