-
Notifications
You must be signed in to change notification settings - Fork 329
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
Add --show-counterparty
flag to hermes query channels
#2463
Conversation
.changelog/unreleased/features/ibc-relayer-cli/2431-show-counterparty.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Romain Ruetschi <romain@informal.systems>
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.
Great job, Ali! Left a few suggestions inline.
output.iter().try_for_each(|pretty_print| { | ||
write!( | ||
f, | ||
"\n{}: {}/{} --- {}: {}/{}", |
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.
To make things slightly prettier, let's use a unicode arrow instead of ---
?
For instance ⟷
ibc-1: transfer/channel-0 ⟷ ibc-0: transfer/channel-0
ibc-1: transfer/channel-1 ⟷ ibc-2: transfer/channel-1
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.
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.
Then let's stick with ASCII!
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.
Wonder why your terminal does that though? Perhaps it's the font?
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.
I have no idea. I could push a new version with the double arrow if you want to try with your terminal as well.
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.
Interesting, they also render funny in iTerm on macOS.
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.
Maybe we can use another emoji ?
--show-counterparty
flag for hermes query channels
--show-counterparty
flag to hermes query channels
.changelog/unreleased/features/ibc-relayer-cli/2429-show-counterparty.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
…erparty.md Co-authored-by: Sean Chen <seanchen11235@gmail.com>
Co-authored-by: Sean Chen <seanchen11235@gmail.com>
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.
Looks good to me!
…stems#2463) * added --show-counterparty flag * added test * changelog entry and fmt * Rename 2431-show-counterparty.md to 2429-show-counterparty.md * Update relayer-cli/src/commands/query/channels.rs Co-authored-by: Romain Ruetschi <romain@informal.systems> * Update 2429-show-counterparty.md * Update 2429-show-counterparty.md * fix typo * fixed tests * update doc * Update relayer-cli/src/commands/query/channels.rs Co-authored-by: Sean Chen <seanchen11235@gmail.com> * Update .changelog/unreleased/features/ibc-relayer-cli/2429-show-counterparty.md Co-authored-by: Sean Chen <seanchen11235@gmail.com> * Update relayer-cli/src/commands/query/channels.rs Co-authored-by: Sean Chen <seanchen11235@gmail.com> * modified error handling * modify error handling Co-authored-by: Romain Ruetschi <romain@informal.systems> Co-authored-by: Sean Chen <seanchen11235@gmail.com>
Closes: #2429
Description
This PR introduces a new flag for
hermes query channels
which outputs every channel along with its corresponding port, and the counterparty chain's id in a pretty way.Example with 3 chains:
Filtering is also working :
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.