hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Collate commitment IDs in output of `query packet`

Open mzabaluev opened this issue 2 years ago • 1 comments

Summary

Collate numerically adjacent commitment IDs in output of query packet subcommands.

Problem Definition

When the set of pending packets on a channel is large and there are many pending commitments with consecutive IDs (which should be expected in normal channel operations), the output may become unfriendly to read for a human.

Proposal

Collate adjacent ID numbers in non-JSON output of commands under query packet, like [100-200, 202, 207].


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate milestone (priority) applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

mzabaluev avatar Apr 26 '22 13:04 mzabaluev

Some code for collating adjacent elements: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=20c056586af6618d9ad52eda3081574b

romac avatar Jul 13 '22 10:07 romac

Done in https://github.com/informalsystems/hermes/pull/2847

romac avatar Nov 10 '22 11:11 romac