Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

CountedMap isn't updating the count on set. #13212

Closed
2 tasks done
ruseinov opened this issue Jan 23, 2023 · 1 comment · Fixed by #13214
Closed
2 tasks done

CountedMap isn't updating the count on set. #13212

ruseinov opened this issue Jan 23, 2023 · 1 comment · Fixed by #13214

Comments

@ruseinov
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

Currently, when doing CountedMap::set it does not update the count, either on value removal or insertion. It should be consistent with StorageMap::set that simply delegates to either StorageMap::insert or StorageMap::remove.

We should make sure CountedMap::set delegates to CountedMap::insert or CountedMap::remove.

Steps to reproduce

Create a CountedMap, try to set a value and then check CountedMap::count() to verify that it returns 0.

@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-38/2122/1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants