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

Return PortId information in query_channels #861

Merged
merged 8 commits into from
Apr 29, 2021

Conversation

soareschen
Copy link
Contributor

@soareschen soareschen commented Apr 28, 2021

Closes: #840

Description

Before:

$ hermes query channels ibc-0
Success: [
    ChannelId(
        "channel-0",
    ),
]

$ hermes -j query channels ibc-0
{"result":["channel-0"],"status":"success"}

After:


$ hermes query channels ibc-0
Success: [
    PortChannelId {
        channel_id: ChannelId(
            "channel-0",
        ),
        port_id: PortId(
            "transfer",
        ),
    },
]

$ hermes -j query channels ibc-0
{"result":[{"channel_id":"channel-0","port_id":"transfer"},{"channel_id":"channel-1","port_id":"transfer"},{"channel_id":"channel-2","port_id":"transfer"}],"status":"success"}

_

For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

This change is Reviewable

Copy link
Collaborator

@ancazamfir ancazamfir 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, thanks @soareschen! Could you please update CHANGELOG.md file?

CHANGELOG.md Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2021

Codecov Report

Merging #861 (44f2e91) into master (615649a) will decrease coverage by 0.0%.
The diff coverage is 0.0%.

❗ Current head 44f2e91 differs from pull request most recent head ba92ebd. Consider uploading reports for the commit ba92ebd to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##           master    informalsystems/hermes#861     +/-   ##
========================================
- Coverage    43.5%   43.4%   -0.1%     
========================================
  Files         170     170             
  Lines       12641   12660     +19     
========================================
  Hits         5507    5507             
- Misses       7134    7153     +19     
Impacted Files Coverage Δ
modules/src/ics24_host/identifier.rs 80.6% <ø> (ø)
relayer/src/chain.rs 0.0% <ø> (ø)
relayer/src/chain/cosmos.rs 0.0% <0.0%> (ø)
relayer/src/chain/mock.rs 63.9% <0.0%> (ø)
relayer/src/keyring.rs 0.0% <0.0%> (ø)
relayer/src/keyring/errors.rs 0.0% <0.0%> (ø)
relayer-cli/src/commands/keys/restore.rs 0.0% <0.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bac82dc...ba92ebd. Read the comment docs.

@soareschen
Copy link
Contributor Author

I have added a PortChannelId type to bundle together PortId and ChannelId and have its own JSON serialization. I will create a separate PR to work on cosmos/ibc-rs#84 to refactor other uses of (PortId, ChannelId) to PortChannelId.

@soareschen soareschen force-pushed the soares/query-channels-port-id branch from 44f2e91 to ba92ebd Compare April 29, 2021 18:37
@soareschen soareschen force-pushed the soares/query-channels-port-id branch from 40e5741 to bbc769e Compare April 29, 2021 19:06
@soareschen
Copy link
Contributor Author

@romac shall we merge this?

@romac romac merged commit 228806a into master Apr 29, 2021
@soareschen soareschen deleted the soares/query-channels-port-id branch April 29, 2021 19:28
@ancazamfir ancazamfir mentioned this pull request May 6, 2021
26 tasks
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
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.

Missing port information in hermes query channels
4 participants