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

Some conversions for Mock failed #79

Closed
5 tasks
yito88 opened this issue Jul 13, 2021 · 0 comments
Closed
5 tasks

Some conversions for Mock failed #79

yito88 opened this issue Jul 13, 2021 · 0 comments
Assignees
Labels
A: bug Admin: something isn't working

Comments

@yito88
Copy link
Contributor

yito88 commented Jul 13, 2021

Crate

IBC

Summary of Bug

I found two bugs in using mock.

  • ClientType::Mock couldn't be converted with from_str() when using ClientType::as_string()
  • When converting MockHeader to RowMockHeader, stack overflow happened

Version

0.5.0

Steps to Reproduce

  • Try to get the client type from the string
let client_type = ClientType::Mock;
let type_string = client_type.as_string();
let client_type_from_str = ClientType::from_str(type_string).expect("Failed")
  • Try to encode MockHeader wrapped by AnyHeader
let height = Height::new(1, 10);
let header = MockHeader::new(height);
// `wrap_any()` isn't implemented for now
let any_header = AnyHeader::from(header);
let bytes = header.encode_vec().expect("Stack overflow happened");

Acceptance Criteria

  • ClientType::Mock can be converted from a proper string
  • MockHeader can be encoded

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere added the A: bug Admin: something isn't working label Jul 13, 2021
@hu55a1n1 hu55a1n1 transferred this issue from informalsystems/hermes Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants