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

get height from grpc metadata for relevant ibc queries #1

Closed
wants to merge 4 commits into from

Conversation

noot
Copy link
Collaborator

@noot noot commented Oct 21, 2024

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    REPLACE THIS TEXT WITH RATIONALE (CAN BE BRIEF)

Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

High level comment: it looks like parsing the height info from the grpc metadata is duplicated 5 times.

Maybe this patch could be streamlined by replacing it with a single function?

Also: fix the warnings please.

@SuperFluffy
Copy link
Member

SuperFluffy commented Oct 24, 2024

@noot I have replaced the 5 instances of inline code by a single function call and provided tests, and also fixed the warnings.

@SuperFluffy
Copy link
Member

I have fixed the test by treating the absence of a height header the same as a value of "0" or "0-0". This fixes the failing test.

@noot
Copy link
Collaborator Author

noot commented Oct 25, 2024

closing in favour of #2

@noot noot closed this Oct 25, 2024
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.

2 participants