-
Notifications
You must be signed in to change notification settings - Fork 94
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
Refactor Height parsing logic and add test cases #758
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #758 +/- ##
==========================================
+ Coverage 73.20% 73.41% +0.20%
==========================================
Files 125 125
Lines 16082 16127 +45
==========================================
+ Hits 11773 11839 +66
+ Misses 4309 4288 -21
☔ View full report in Codecov by Sentry. |
Ahh, my bad. Just noticed yours. Would it work with you we move forward with #759? |
Or you can also port changes that make sense from there? |
no problem |
@@ -159,6 +159,8 @@ pub enum HeightError { | |||
}, | |||
/// attempted to parse an invalid zero height | |||
ZeroHeight, | |||
/// the height(`{raw_height}`) is not valid, this format must be used: \[revision_number\]-\[revision_height\] | |||
InvalidHeight { raw_height: String }, |
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.
Would you rename this to smt like InvalidFormat
?
This can a bit confusing given the other InvalidHeight we already have under the ClientError
enum
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.
Awesome 👌🏻
* Refactor Height parsing logic and add test cases * Create 752-fix-752.md * Refactor error message for invalid height format * Update height.rs * Refactored height parsing logic and added tests * Refactor error message for invalid height format * Refactor variable name for consistency in `Height` conversion
Closes: #752
Description
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.