-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat: introduce rsmt2d.ErrTooFewShards
#201
Conversation
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
- Coverage 80.80% 80.43% -0.37%
==========================================
Files 7 7
Lines 500 506 +6
==========================================
+ Hits 404 407 +3
- Misses 57 59 +2
- Partials 39 40 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
On second thought, I think it may help readability to isolate the error handling logic inside |
rebuildShares
rsmt2d.ErrTooFewShards
return nil, ErrTooFewShards | ||
} | ||
if err != nil { | ||
return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm finding it difficult to cover this line via unit tests by triggering an error in Reconstruct that isn't ErrTooFewShards
or ErrShardNoData
. Given this observation, this PR seems low priority.
Closing b/c #201 (comment) |
Closes #199 but doesn't remove
rebuiltShares
Closes #200 via Option A