-
Notifications
You must be signed in to change notification settings - Fork 432
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
Fix the StorageVec
type by excluding the len_cached
field from its type info
#2052
Conversation
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've just thought of an alternative way to do it: add #[codec(skip)]
to the len_cached
field. Then CachedLen
should not require its own TypeInfo
implementation.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2052 +/- ##
==========================================
- Coverage 53.47% 53.46% -0.02%
==========================================
Files 221 221
Lines 6984 6982 -2
Branches 3082 3082
==========================================
- Hits 3735 3733 -2
Misses 3249 3249 ☔ View full report in Codecov by Sentry. |
StorageVec
type by excluding the len_cached
field from its type info
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Tue Jan 9 17:40:53 CET 2024 |
Good catch |
Summary
cargo-contract
orpallet-contracts
?Fix the
StorageVec
type by excluding thelen_cached
field from its type infoDescription
There is an issue with the
len_cached
field of theStorageVec
type. It is not stored in the storage but is defined in theStorageVec
asTypeInfo
Option<u32>
. This is causing a decoding error when theStorageVec
type is decoded from storage.Checklist before requesting a review
CHANGELOG.md