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

test: AllSquareSizes #679

Merged
merged 1 commit into from
Sep 2, 2022
Merged

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Sep 2, 2022

Closes #677

@rootulp rootulp self-assigned this Sep 2, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #679 (f85180d) into main (3b7a3d8) will increase coverage by 0.47%.
The diff coverage is 73.52%.

@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
+ Coverage   36.40%   36.87%   +0.47%     
==========================================
  Files          25       25              
  Lines        2637     2671      +34     
==========================================
+ Hits          960      985      +25     
- Misses       1594     1600       +6     
- Partials       83       86       +3     
Impacted Files Coverage Δ
pkg/shares/parse_message_shares.go 88.60% <ø> (ø)
x/payment/types/wirepayfordata.go 66.35% <73.52%> (+1.33%) ⬆️

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

}

tests := []testCase{
{0, []uint64{2, 4, 8, 16, 32, 64, 128}}, // should this function return an error for a message size of 0?
Copy link
Member

Choose a reason for hiding this comment

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

this is a really good point! I'm not sure. Technically, iirc, messages of length zero are invalid, but handling that error each time we use this function seems cumbersome. Perhaps we should just handle that in validate basic (if we're not already) and then assume that its fine here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I pulled the trigger on merge before seeing this but agreed seems cumbersome to handle errors from this function and would prefer a validate basic check on message length.

@evan-forbes
Copy link
Member

really great comments on the test btw

@rootulp rootulp merged commit feebea0 into celestiaorg:main Sep 2, 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.

Unit test AllSquareSizes
3 participants