Skip to content
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 cache data when upgrading modules with init script function #161

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

nanne007
Copy link
Member

related pr starcoinorg/starcoin#2761

The problem is when upgrading modules with init script function and resources are loaded into cache before updating modules, the Type key in cached map can be invalid, because reloading modules will change struct index after upgrading modules.
So next time, init script function will find wrong resources based on old struct index.

The PR change Type into struct tag, which always remains the same.

@nanne007 nanne007 requested a review from jolestar August 10, 2021 06:03
@jolestar jolestar merged commit 69ab012 into starcoin-release-1.3 Aug 10, 2021
@nanne007 nanne007 deleted the fix/resource-exists branch August 17, 2021 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants