Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Pools: Make
PermissionlessWithdraw
the default claim permission #3438Pools: Make
PermissionlessWithdraw
the default claim permission #3438Changes from 13 commits
ac22eaf
a3c99b2
aef4328
ee7d671
2022bb6
d767c17
5bc0356
36c6c97
cf38a3f
c305dda
4077e3f
af6a347
d08910f
ab4e5a3
a8d72d4
2e32747
b51c28d
425e725
32c8ed3
0c89e34
d1d9119
bdfe4ea
43de3cc
f5a75b1
a001fe7
b0afaa4
b80571b
8c6a654
8bf1c2a
b50b31a
62d8979
350c009
0b6f0ad
5493232
387e9bd
69d35b9
56a24b9
34d4807
7c7cc7a
c354aca
e0891a0
65db056
e39539a
682b334
8d6871d
d800fcc
767e539
2d1eec6
35505c6
892e7ca
6c77e10
83caea6
a8041d1
e10332a
05e124f
04b2d50
31ad8a4
80499a6
95ae56f
abe04ca
0b1d09e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Since it is not an obvious default, my opinion would be to remove the default impl and explicitly use the variant where needed.
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'm not sure I understand the ambiguity - the code is explicitly stating this is the default value so I think it looks quite obvious to the keen pallet observer. I think coming from nominators also it is intuitively the same behaviour, e.g. anyone can trigger a validator payout in the same manner as anyone can claim an unclaimed reward in this case.
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.
IMO obvious defaults are like
false
,zero
but anything else should ideally not have defaults. Since its a value query it will default to this value if the key is missing and I generally think its better to be explicit as much as we can.Though its just my opinion and if you disagree and no one else objects, I am fine with this.
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.
Since its only a small subset of accounts that has
PermissionlessAll
variant, technically you could avoid rewriting the other variants (since they are same) and translate only thePermissionlessAll
. Not sure the best way to do it and since its one time its okay to do like this as well.P.S.: Most probably the overlay cache optimises this and does not rewrite if its the same value. But we are pedantic we can avoid hitting the overlay cache as well.
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.
ClaimPermissions
is stored per user, this unbounded loop is totally explode-able.