Skip to content

refactor: popIfNonEmpty for leaf hashes#257

Merged
walldiss merged 1 commit intocelestiaorg:mainfrom
walldiss:safety-check-for-leafhashes
May 24, 2024
Merged

refactor: popIfNonEmpty for leaf hashes#257
walldiss merged 1 commit intocelestiaorg:mainfrom
walldiss:safety-check-for-leafhashes

Conversation

@walldiss
Copy link
Member

Use popIfNonEmpty instead of manual advancement of slice.

@walldiss walldiss self-assigned this May 24, 2024
@codecov
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.

// leaf
if proof.Start() <= start && start < proof.End() {
leafHash := leafHashes[0]
// advance leafHashes
Copy link
Contributor

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
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.

4 participants