-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat!: implement expired subspace fee grant deletion #1198
feat!: implement expired subspace fee grant deletion #1198
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1198 +/- ##
==========================================
- Coverage 80.95% 80.49% -0.46%
==========================================
Files 215 218 +3
Lines 18062 18289 +227
==========================================
+ Hits 14622 14722 +100
- Misses 2829 2955 +126
- Partials 611 612 +1
☔ View full report in Codecov by Sentry. |
…thub.com:desmos-labs/desmos into paul/impl-subspace-fee-grant-expiration-deletion
x/subspaces/legacy/v7/store.go
Outdated
allowanceKey := allowancePrefix | ||
allowanceKey = append(allowanceKey, iterator.Key()...) |
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.
These lines can be combined
allowanceKey := allowancePrefix | |
allowanceKey = append(allowanceKey, iterator.Key()...) | |
allowanceKey := append(allowancePrefix, iterator.Key()...) |
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.
It would cause the linter error: appendAssign: append result not assigned to the same slice (gocritic)
.
https://github.com/desmos-labs/desmos/actions/runs/5552100585/jobs/10139013465#step:5:146
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.
What about something like this?
allowanceKey := append([]byte(allowanceKey...), iterator.Key()...)
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.
It would be another linter problem:
x/subspaces/legacy/v7/store.go:33:33: unnecessary conversion (unconvert) allowanceKey := append([]byte(allowancePrefix), iterator.Key()...)
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.
Ok then we can leave it as it is
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.
I found the similar codes in profile grpc_query
which uses append([]byte(nil), prefix)
pattern. I think we can apply it.
https://github.com/desmos-labs/desmos/blob/master/x/profiles/keeper/grpc_query.go#L179
Updated
Co-authored-by: Riccardo <riccardo.montagnin@gmail.com>
Co-authored-by: Riccardo <riccardo.montagnin@gmail.com>
Co-authored-by: Riccardo <riccardo.montagnin@gmail.com>
Co-authored-by: Riccardo <riccardo.montagnin@gmail.com>
…thub.com:desmos-labs/desmos into paul/impl-subspace-fee-grant-expiration-deletion
Description
This PR implements expired subspace fee grant deletion mentioned in ADR-017.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change