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 panic when querying connections filtered by counterparty chain #3381

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

romac
Copy link
Member

@romac romac commented May 30, 2023

Closes: #3380

Description


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@romac
Copy link
Member Author

romac commented May 31, 2023

With this branch, the results from following the steps at #3380 (comment) are as expected:

Query all the connections on ibc-0:

$ hermes query connections --chain-id ibc-0
SUCCESS [
    ConnectionId(
        "connection-0",
    ),
    ConnectionId(
        "connection-1",
    ),
    ConnectionId(
        "connection-2",
    ),
    ConnectionId(
        "connection-3",
    ),
    ConnectionId(
        "connection-4",
    ),
    ConnectionId(
        "connection-5",
    ),
]

Then filter the connections to only include the ones who point to ibc-1:

❯ hermes query connections --chain ibc-0 --counterparty-chain ibc-1
SUCCESS [
    ConnectionId(
        "connection-0",
    ),
    ConnectionId(
        "connection-1",
    ),
    ConnectionId(
        "connection-2",
    ),
]

Let's do the same for the connections pointing to ibc-2:

$ hermes query connections --chain ibc-0 --counterparty-chain ibc-2
SUCCESS [
    ConnectionId(
        "connection-3",
    ),
    ConnectionId(
        "connection-4",
    ),
    ConnectionId(
        "connection-5",
    ),
]

@romac romac marked this pull request as ready for review May 31, 2023 12:29
@romac romac requested review from ancazamfir and ljoss17 May 31, 2023 12:30
@romac romac changed the title Fix panic when querying connections filtered by counterparty chain id Fix panic when querying connections filtered by counterparty chain May 31, 2023
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.

lgtm, thanks @romac

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.

lgtm, thanks @romac

@romac romac merged commit 5788c02 into master Jun 5, 2023
@romac romac deleted the romac/3380-panic-query-connections branch June 5, 2023 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.

Panic when trying to ask for the connections between two chains
2 participants