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

Create a migration that fixes CountedMap counts. #13218

Closed
ruseinov opened this issue Jan 23, 2023 · 4 comments
Closed

Create a migration that fixes CountedMap counts. #13218

ruseinov opened this issue Jan 23, 2023 · 4 comments
Labels
Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@ruseinov
Copy link
Contributor

ruseinov commented Jan 23, 2023

A continuation of #13214.

Basically anybody who's been using set on a CountedMap before the aforementioned PR was merged needs to call initialize_counter on that map.

@kianenigma
Copy link
Contributor

None of our runtimes had an issue regarding this. So while I agree that we need to communicate this to the outer world in case they did use the wrong function, I don't think having an issue here is the right way.

This issue should be closed by someone writing a recalculate method for counted maps that re-generates the counter.

@kianenigma kianenigma added Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Feb 14, 2023
@ruseinov
Copy link
Contributor Author

@kianenigma afaik recalculate already exists, will confirm and close

@ruseinov
Copy link
Contributor Author

Yep, here it is: initialize_counter. I think we can close this.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Runtime / FRAME Feb 14, 2023
@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
Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
Status: Done
Development

No branches or pull requests

3 participants