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

fix(ghverify): fix avl tree iteration in Render and GetFeedDefinitions #2933

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

omarsy
Copy link
Member

@omarsy omarsy commented Oct 10, 2024

This pull request resolves a bug in the iteration logic of the iterate function from gno.land/p/demo/avl (avlTree) as used in two key areas: the Render function of gno.land/r/gnoland/ghverify and the GetFeedDefinitions function of gno.land/p/demo/gnorkle/gnorkle.

Problem:

In both instances, the iterate function was returning true after processing the first item, which prematurely halted the iteration. As a result, only the first item was processed, and all subsequent items were ignored.

@omarsy omarsy requested review from moul and a team as code owners October 10, 2024 11:42
@omarsy omarsy requested review from deelawn and removed request for a team October 10, 2024 11:42
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 10, 2024
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.95%. Comparing base (912a5db) to head (2ba9aad).
Report is 22 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2933      +/-   ##
==========================================
- Coverage   60.97%   60.95%   -0.02%     
==========================================
  Files         564      564              
  Lines       75273    75273              
==========================================
- Hits        45897    45883      -14     
- Misses      26008    26020      +12     
- Partials     3368     3370       +2     
Flag Coverage Δ
contribs/gnodev 60.65% <ø> (-0.82%) ⬇️
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 67.92% <ø> (ø)
gnovm 65.78% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (ø)
tm2 62.04% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

Ha, cool. Didn't catch this. I think it could also be a good improvement to make the render a bit nicer, but that's for another PR.

@moul
Copy link
Member

moul commented Oct 10, 2024

The title isn't clear. Could you please add a scope, such as fix(ghverify): ...?

To the reviewers, please be mindful of this.

@omarsy omarsy changed the title fix: GetFeedDefinitions and Render functions should return all items fix(ghverify): ensure AVL tree iteration processes all items in Render and GetFeedDefinitions function Oct 10, 2024
@omarsy
Copy link
Member Author

omarsy commented Oct 10, 2024

The title isn't clear. Could you please add a scope, such as fix(ghverify): ...?

To the reviewers, please be mindful of this.

@moul
Yes my bad, I should be more careful about that ^^

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

LGTM

@thehowl thehowl changed the title fix(ghverify): ensure AVL tree iteration processes all items in Render and GetFeedDefinitions function fix(ghverify): fix avl tree iteration in Render and GetFeedDefinitions Oct 21, 2024
@thehowl thehowl merged commit af169ff into gnolang:master Oct 21, 2024
123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants