-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix host_height, host_timestamp return value #243
Conversation
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.
Looks great, thanks! Just 2 minor changes to the changelog entry, and we'll get that merged in!
@@ -0,0 +1,2 @@ | |||
- Change host_height, host_timestamp return value in ics02, ics03, ics04 |
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.
- Change host_height, host_timestamp return value in ics02, ics03, ics04 | |
- Change `host_height`, `host_timestamp` return value to a `Result` in `ClientReader`, `ConnectionReader`, and `ChannelReader` |
@@ -0,0 +1,2 @@ | |||
- Change host_height, host_timestamp return value in ics02, ics03, ics04 |
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.
Additionally, can we move this to the .changelog/unreleased/breaking-changes
directory?
Also, now that #241 is merged, could you apply the same change to |
Done |
|
||
/// Returns the current timestamp of the local chain. | ||
fn host_timestamp(&self) -> Timestamp { | ||
fn host_timestamp(&self) -> Result<Timestamp, ClientError> { |
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.
ClientError
is not appropriate here, but we don't have a good solution for that at the moment. We would really need some HostError
. We can fix this with #164.
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.
I would also like to use this way to solve, it is not very clear that the current no_std support is not very perfect
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.
🙏
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.
Will re-approve after merge conflicts are resolved
* Change host_height, host_timestamp return Value * fmt code * Create 242-change-return-value.md * fix clippy * update .changelog * Change host_height, host_timestamp return value in ValidationContext * update Ics18context to RelayerContext in mock/context.rs Signed-off-by: Davirain <[email protected]>
Closes: #242
Description
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.