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

Make port keeper's IsBound a public function #288

Closed
3 tasks
colin-axner opened this issue Jul 22, 2021 · 3 comments · Fixed by #425
Closed
3 tasks

Make port keeper's IsBound a public function #288

colin-axner opened this issue Jul 22, 2021 · 3 comments · Fixed by #425
Assignees
Milestone

Comments

@colin-axner
Copy link
Contributor

colin-axner commented Jul 22, 2021

Summary

Port Keeper has a function isBound which checks if the provided portID is already binded to a module.

Problem Definition

ICA needs to check if a portID is already bound, otherwise the port keeper will panic. I realized the current implementation incorrectly checks if the port is bound and does result in a panic. This only occurs if another module claimed a portID within the namespace ICA is working in

The problem was ICA was checking against its scoped keeper, replicating the code in 05-port. But 05-port checks against the IBC scoped keeper. So any port bound that ICA did not claim would cause a panic.

Proposal

The isBound function should be public OR return errors in 05-port instead of panicking #41

cc @AdityaSripal


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@seantking
Copy link
Contributor

I can pick this up. Should we just make IsBound public?

@colin-axner
Copy link
Contributor Author

I can pick this up. Should we just make IsBound public?

I'm in favor of it being public and eventually 05-port returning errors instead of panics, but the public change seems like a good short term fix

@seantking
Copy link
Contributor

Nice. I'll make a PR, thanks. 👍

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 a pull request may close this issue.

3 participants