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

imp: adding IsOpen and IsClosed methods to Channel type (#4152) #4155

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

AbolfazlSoltaani
Copy link
Contributor

Description

Add IsOpen and IsClosed methods to Channel.

closes: #4152

Commit Message / Changelog Entry

imp: adding `IsOpen` and `IsClosed` methods to Channel type (#4152)

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@codecov-commenter
Copy link

Codecov Report

Merging #4155 (22209bc) into main (31b3c60) will decrease coverage by 0.03%.
The diff coverage is 33.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4155      +/-   ##
==========================================
- Coverage   78.89%   78.86%   -0.03%     
==========================================
  Files         188      188              
  Lines       12990    12994       +4     
==========================================
  Hits        10248    10248              
- Misses       2313     2317       +4     
  Partials      429      429              
Impacted Files Coverage Δ
.../apps/27-interchain-accounts/host/keeper/keeper.go 85.38% <0.00%> (ø)
modules/core/04-channel/types/channel.go 68.42% <0.00%> (-3.81%) ⬇️
...27-interchain-accounts/controller/keeper/keeper.go 90.62% <50.00%> (ø)
...interchain-accounts/controller/keeper/handshake.go 89.85% <100.00%> (ø)
...ps/27-interchain-accounts/host/keeper/handshake.go 89.39% <100.00%> (ø)

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @AtreusSoltani. I think there a few more places where IsClosed could be used. If you look for channel.State == types.CLOSED you will find them. :)

@AbolfazlSoltaani
Copy link
Contributor Author

Thanks, @AtreusSoltani. I think there a few more places where IsClosed could be used. If you look for channel.State == types.CLOSED you will find them. :)

You are right, I didn't see them before. I fixed it.

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @AtreusSoltani!

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you, @AtreusSoltani!

@crodriguezvega crodriguezvega merged commit ec93b64 into cosmos:main Jul 21, 2023
50 checks passed
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.

Add helper function for checking if a channel is open
4 participants