Merged
Conversation
81f90e7 to
8a869b8
Compare
AlCutter
reviewed
Jul 28, 2017
integration/maptest/map_test.go
Outdated
| if err := verifyGetMapLeavesResponse(getResp, indexes, int64(numBatches), | ||
| pubKey, hasher, tree.TreeId); err != nil { | ||
| return err | ||
| return fmt.Errorf("batch: %v, %v", i, err) |
Member
There was a problem hiding this comment.
fmt.Errorf("batch %v: verifyGetMapLeavesResponse() = %v", i, err) might be a bit quicker at pointing the person debugging it here?
integration/maptest/map_test.go
Outdated
| } | ||
| } | ||
|
|
||
| // h2b converts a hex string into []byte. |
Member
There was a problem hiding this comment.
There's testonly.MustHexDecode which does the same thing, BTW.
Contributor
Author
There was a problem hiding this comment.
Shorter names are nice?
Member
There was a problem hiding this comment.
So is deduplication :)
How about this:
var h2b = testonly.MustHexDecode
storage/types.go
Outdated
| if bits == 0 { | ||
| panic(fmt.Sprintf("storage Split: %x(n.PrefixLenBits: %v - prefixBytes: %v *8) == 0", n.Path, n.PrefixLenBits, prefixBytes)) | ||
| } | ||
| suffixBytes := (bits + 7) / 8 |
Member
There was a problem hiding this comment.
you can use bytesForBits for this :)
Contributor
There was a problem hiding this comment.
He might have removed that in a previous PR?
Member
There was a problem hiding this comment.
It lives on (at least currently):
Line 71 in d9f0b51
Fixed the following problems:
- NewNodeIDFromRelativeBitInt
- Was placing subtree indexes in a left justified rather than right
justified manner.
- NodeID.Split
- Modular arithmatic for suffix.Bits assumed equal strata levels
AlCutter
approved these changes
Jul 28, 2017
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed the following problems:
NewNodeIDFromRelativeBitInt
justified manner.
NodeID.Split