Pallet-pools: replace Vec storage by BoundedVec#979
Conversation
NunoAlexandre
left a comment
There was a problem hiding this comment.
Looks good to me but it should be approved by a pallet-pools pool owner ☑️
mustermeiszer
left a comment
There was a problem hiding this comment.
This looks fine.
The reason why I am not approving is that I am not sure of the bounds of vectors are checked when being deserialized from rpc.
Can anybody confirm that an extrinsic with an BoundedVec<T, S> will fail to be called when the input for the vector exceeds S?
branan
left a comment
There was a problem hiding this comment.
Very small change requested for cleanup/readability. Otherwise this LGTM.
Yes, it fails: https://paritytech.github.io/substrate/master/src/sp_core/bounded/bounded_vec.rs.html#81 |
|
@mustermeiszer |
mustermeiszer
left a comment
There was a problem hiding this comment.
LGTM! Although, if you wanna adjust according to Branans proposal of creating a type for the changed structs that would be great.
a30dbe8
a30dbe8 to
cd6e8bf
Compare
|
Removed my request for changes, so I believe once this is rebased it can be approved by anyone to get it merged now |
cd6e8bf to
e8402d5
Compare
branan
left a comment
There was a problem hiding this comment.
I turned off the auto-merge because I had a nitpick, but I'm otherwise happy with this 👍
|
Meh, changed my mind. This has been lingering long enough, and it's easy enough to fix that type the next time we touch this. As long as clippy isn't complaining about type complexity yet it's not the end of the world |
|
I've seen late your last comment. Thanks for the review anyway! |
Description
Replace
Vecstorage withBoundedVecinpallet-poolsto be prepared for Weights V2Related to: #897
Changes and Descriptions
Modify
Vectypes found in thepallet-poolsstorages.Type of change
How Has This Been Tested?
Checklist:
parachainbranch