Skip to content

Commit

Permalink
Fix panics in packet queries (informalsystems#554)
Browse files Browse the repository at this point in the history
* Fix for informalsystems#521. Will fix the unwraps for QueryUnreceivedAcknowledgementCmd also

* Added the 'required' annotation to packet queries.

When a free option (such as a chain_id or port_id) in a command
is tagged with the 'required' attribute, this will safeguard against
invoking the command with `default()` values for the corresponding
option.

* Updated the changelog

* Apply suggestions from code review

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* FMT fix

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
  • Loading branch information
adizere and ancazamfir authored Jan 27, 2021
1 parent a9e2b6b commit 0fb1c23
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 55 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [relayer-cli]
- Replace `ChannelConfig` in `Channel::new` ([#511])
- Add `packet-send` CLI ([#470])
- UX improvements for relayer txs ([#536, #540])
- UX improvements for relayer txs ([#536, #540, #554])

- [relayer]
- Performance improvements ([#514], [#537])
Expand Down Expand Up @@ -59,6 +59,7 @@
[#536]: https://github.com/informalsystems/ibc-rs/issues/536
[#537]: https://github.com/informalsystems/ibc-rs/issues/537
[#540]: https://github.com/informalsystems/ibc-rs/issues/540
[#554]: https://github.com/informalsystems/ibc-rs/issues/554


## v0.0.6
Expand Down
8 changes: 4 additions & 4 deletions relayer-cli/src/commands/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ mod packet;
#[derive(Command, Debug, Options, Runnable)]
pub enum QueryCmd {
/// The `query client` subcommand
#[options(help = "query client")]
#[options(help = "query information about client(s)")]
Client(QueryClientCmds),

/// The `query connection` subcommand
#[options(help = "query connection")]
#[options(help = "query information about connection(s)")]
Connection(QueryConnectionCmds),

/// The `query channel` subcommand
#[options(help = "query channel")]
#[options(help = "query information about channel(s)")]
Channel(QueryChannelCmds),

/// The `query packet` subcommand
#[options(help = "query packets")]
#[options(help = "query information about packet(s)")]
Packet(QueryPacketCmds),
}

Expand Down
Loading

0 comments on commit 0fb1c23

Please sign in to comment.