-
Notifications
You must be signed in to change notification settings - Fork 617
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
feat: add a method to check if the scope module already exists in the capability keeper #6716
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.
seems like a sensible addition to me!
Do you have a use case for not sealing the capability keeper and using Either way, happy to merge this addition. We should be able to make a patch release of x/capability to include it! |
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.
Thanks @Pantani! 🙏🏻
… capability keeper (#6716) * add method to check if the scope module already exist * chore: add changelog * Update modules/capability/keeper/keeper_test.go Co-authored-by: Nikolas De Giorgis <[email protected]> --------- Co-authored-by: DimitrisJim <[email protected]> Co-authored-by: Damian Nolan <[email protected]> Co-authored-by: Nikolas De Giorgis <[email protected]> (cherry picked from commit 8942179) # Conflicts: # modules/capability/CHANGELOG.md
… capability keeper (backport #6716) (#6732) * feat: add a method to check if the scope module already exists in the capability keeper (#6716) * add method to check if the scope module already exist * chore: add changelog * Update modules/capability/keeper/keeper_test.go Co-authored-by: Nikolas De Giorgis <[email protected]> --------- Co-authored-by: DimitrisJim <[email protected]> Co-authored-by: Damian Nolan <[email protected]> Co-authored-by: Nikolas De Giorgis <[email protected]> (cherry picked from commit 8942179) # Conflicts: # modules/capability/CHANGELOG.md * chore: fix conflicts * chore: update changelog --------- Co-authored-by: Danilo Pantani <[email protected]> Co-authored-by: DimitrisJim <[email protected]> Co-authored-by: Damian Nolan <[email protected]>
Description
Add method
HasModule(moduleName string)
to check if the scope module already exists in the capability keeper. This method can help avoid creating two scope keepers by mistake and panicking the chain, and it helps the workaround to make IBC work with the app wiring chains.