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

Quick fix for update client when trusted_height == target_height #1036

Closed
wants to merge 2 commits into from

Conversation

soareschen
Copy link
Contributor

@soareschen soareschen commented Jun 2, 2021

Closes: #997

Description

Quick fix of #997 that is extracted from the proper fix #1011.


For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@@ -542,7 +545,7 @@ impl ForeignClient {

assert!(!events.is_empty());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this assertion here? I guess we still expect the events vec to be non-empty but since we can now gracefully handle the case where it's not, perhaps we could convert it to a debug_assert!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine to remove it. I checked the callers and none of them are really doing anything with the result returned. Otherwise it would depends on whether the other functions check on the events returned. If we want to do checking, it should still return an Err result instead of using assert! or debug_assert!.

Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this, see #997 (comment)

@adizere adizere assigned soareschen and unassigned soareschen Jun 9, 2021
@adizere
Copy link
Member

adizere commented Jun 9, 2021

#997 is easy to handle and will be fixed in another PR.

@adizere adizere closed this Jun 9, 2021
@romac romac deleted the soares/quick-fix-update-client branch January 26, 2022 14:19
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 this pull request may close these issues.

Hermes client update fails if client was recently created
4 participants