Is there an existing issue?

  • [X] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • [X] This is not a support question.

Description of bug

Would be nice if it were possible to call decode_len on an unbounded BTreeSet. Is there a limitation that makes this impossible atm?

Steps to reproduce

No response


Where do you want to use this? BTreeSet is not a storage item where we would normally need decode_len.


sounds reasonable to have IMO.


Ah, I see we have impl<T: Encode> StorageDecodeLength for Vec<T> {}, so it could be done analogous for BTreeSet.

What I meant was that there is no StorageBTreeSet type, only BoundedBTreeSet. So if you want to decode the length of a StorageValue<BTreeSet>, you already have the whole thing fetched and have no PoV gain from using decode_len.


Can I pick this up? @kianenigma @ggwpez


IMO yes @dharjeezy

© 2022 - All rights reserved.