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

refactor: popIfNonEmpty for leaf hashes #257

Merged
merged 1 commit into from
May 24, 2024

Conversation

walldiss
Copy link
Member

Use popIfNonEmpty instead of manual advancement of slice.

@walldiss walldiss self-assigned this May 24, 2024
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.43%. Comparing base (7831a96) to head (ec1ad30).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
- Coverage   66.50%   66.43%   -0.07%     
==========================================
  Files           6        6              
  Lines        1030     1028       -2     
==========================================
- Hits          685      683       -2     
  Misses        328      328              
  Partials       17       17              

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

@@ -344,10 +344,8 @@ func (proof Proof) VerifyLeafHashes(nth *NmtHasher, verifyCompleteness bool, nID
// if the leaf index falls within the proof range, pop and return a
// leaf
if proof.Start() <= start && start < proof.End() {
leafHash := leafHashes[0]
// advance leafHashes

Choose a reason for hiding this comment

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

Useless comment?

@walldiss walldiss merged commit 9fb3c91 into celestiaorg:main May 24, 2024
6 checks passed
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.

None yet

4 participants