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

Only allow channel-ids of the form channel-{N} #50

Closed
7 tasks
hu55a1n1 opened this issue Apr 6, 2022 · 1 comment · Fixed by informalsystems/hermes#2071
Closed
7 tasks

Only allow channel-ids of the form channel-{N} #50

hu55a1n1 opened this issue Apr 6, 2022 · 1 comment · Fixed by informalsystems/hermes#2071
Assignees

Comments

@hu55a1n1
Copy link
Contributor

hu55a1n1 commented Apr 6, 2022

Summary of Bug

The ChannelId::FromStr impl does check if the given string is a valid ICS24 identifier but doesn't check if it is of the form channel-{N}.

Version

master

Acceptance Criteria

  • It shouldn't be possible to create a channel that isn't of the form channel-{N}.
  • Should we remodel ChannelId as ChannelId(u64) instead?

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac
Copy link
Member

romac commented Apr 6, 2022

Good catch! Let's model it as a newtype of u64 indeed!

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 a pull request may close this issue.

2 participants