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

Make Golint happy in the blocks submodule. #3827

Merged
merged 1 commit into from
Mar 24, 2017
Merged

Make Golint happy in the blocks submodule. #3827

merged 1 commit into from
Mar 24, 2017

Conversation

hsanjuan
Copy link
Contributor

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.

@hsanjuan hsanjuan self-assigned this Mar 24, 2017
@hsanjuan hsanjuan added status/in-progress In progress labels Mar 24, 2017
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 <hector@protocol.ai>
@hsanjuan
Copy link
Contributor Author

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.
Copy link
Member

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.

Copy link
Contributor Author

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...

Copy link
Member

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.

Copy link
Member

@Kubuxu Kubuxu left a 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

@whyrusleeping whyrusleeping merged commit 8eeb693 into master Mar 24, 2017
@whyrusleeping whyrusleeping deleted the golint-1 branch March 24, 2017 17:05
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Mar 24, 2017
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.

None yet

3 participants