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
migrate alliance, fast-unstake and bags list to use derive-impl #1636
migrate alliance, fast-unstake and bags list to use derive-impl #1636
Changes from 7 commits
49b6757
e9b5626
b304cfd
cd8513b
b3ae7ce
a319f93
97f953e
e652c54
5965703
3c74110
bfcb62d
917f54f
ed28c1c
8f99359
581e218
38f196f
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.
Huh, when we have
#[inject_runtime_type]
here, does it actually mean that the RHS here can be anything we want, and it wouldn't matter?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 can be any type (as long as it is a valid type identifier) and any type is valid because in
DefaultConfig
it is merely atype RuntimeHoldReason
with no bounds.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 is the 'good reason'? should we mention it in this comment?
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 had mixed this in nomination-pools, where we do use u128 such that the process of converting a pool id into account id would work and yield different numbers. I actually don't know the reason for this, and will try and move it to u32.
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 seems to have something to do with iteration order -- with u128, if I insert
1
and2
into a map and then iter on it, I get it back in the same order, but not with u32.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.
the right behavior is actually to be agnostic to the order, as the pallet makes no guarantees there.
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.
why?
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 am not aware tbh, but somehow in the test setu they wishes to on;y allow balances and remark transactions. Probably to test that any call filter here cannot be bipassed by being wrapped in a multisig.
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'd love to see docs on these macros
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.
Docs are available here:
polkadot-sdk/substrate/frame/support/src/lib.rs
Line 844 in cfc6cc6
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.
Would be good to modify the error message as well.