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: joinByteSlice implementation #791

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Sep 26, 2022

Closes #789

@rootulp rootulp self-assigned this Sep 26, 2022
// slice.
func stripCompactShares(compactShares [][]byte, start uint64, end uint64) (result []byte) {
for i := start; i <= end; i++ {
result = append(result, compactShares[i][appconsts.NamespaceSize+appconsts.ShareInfoBytes+appconsts.CompactShareReservedBytes:]...)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[for reviewers] note we don't need to parse the unit length delimiter that is prefixed to a transaction because the test checks that this share range contains the raw tx bytes. Therefore, it is safe to keep the unit length delimiter in the stripped compact shares returned from this function

@codecov-commenter
Copy link

Codecov Report

Merging #791 (11027e9) into main (ab55fc4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #791   +/-   ##
=======================================
  Coverage   23.28%   23.28%           
=======================================
  Files          71       71           
  Lines        8788     8788           
=======================================
  Hits         2046     2046           
  Misses       6570     6570           
  Partials      172      172           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rootulp rootulp marked this pull request as ready for review September 26, 2022 19:19
@rootulp rootulp enabled auto-merge (squash) September 26, 2022 19:19
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

nice catch

@rootulp rootulp merged commit 582f352 into celestiaorg:main Sep 26, 2022
rach-id pushed a commit to rach-id/celestia-app that referenced this pull request Nov 16, 2022
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.

joinByteSlices in proof_test contains a bug
3 participants