-
Notifications
You must be signed in to change notification settings - Fork 384
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
Remove trees.Hash. #2456
Remove trees.Hash. #2456
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2456 +/- ##
==========================================
- Coverage 66.02% 65.99% -0.03%
==========================================
Files 104 103 -1
Lines 7119 7061 -58
==========================================
- Hits 4700 4660 -40
+ Misses 1912 1900 -12
+ Partials 507 501 -6
Continue to review full report at Codecov.
|
Part of #2245.
return fmt.Errorf("trees.Hash()=%v, want: nil", err) | ||
} | ||
hasher := hasherFn.New() | ||
hasher := crypto.SHA256.New() |
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.
Should we still verify that tree.HashAlgorithm == sigpb.DigitallySigned_SHA256
, or it's done elsewhere? Perhaps in the place where tree
is obtained.
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.
Ah, no need to do it in the the tests. What about the main code?
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.
This is what I figured (that it was ok in the tests)... At the one "real" call site (Signer
, in trees.go
), I replaced the call with a check that it is the expected algorithm.
Part of #2245.
Checklist