-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make Golint happy in the blocks submodule. #3827
Conversation
This has required changing the order of some parameters and adding HashOnRead to the Blockstore interface (which I have in turn added to all the wrapper implementations). License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
codeclimate is a troll |
@@ -11,16 +12,20 @@ import ( | |||
mh "gx/ipfs/QmbZ6Cee2uHjG7hf19qLHppgKDRtaG4CVtMzdmK9VCVqLu/go-multihash" | |||
) | |||
|
|||
var ErrWrongHash = errors.New("data did not match given hash!") | |||
// ErrWrongHash is returned when the Cid of a block is not the expected | |||
// according to the contents. It is currently used only when debugging. |
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 think it is also used when HashOnRead is on.
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.
That uses ErrHashMismatch = errors.New("block in storage has different hash than requested")
in the blockstore module...
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.
Ok, let's leave it as it is we might want to merge those errors in future. I must have not noticed it when I were writing the HashOnRead 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.
One note, otherwise LGTM
This has required changing the order of some parameters and
adding HashOnRead to the Blockstore interface (which I have in turn
added to all the wrapper implementations).
I plan to do more, but let's merge little by little, submodule by submodule.