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

mild refactor of bitswap #1199

Merged
merged 2 commits into from
May 6, 2015
Merged

mild refactor of bitswap #1199

merged 2 commits into from
May 6, 2015

Conversation

whyrusleeping
Copy link
Member

This is a mild cleanup of bitswap to remove some unused code and return errors from a few more functions because i hate not returning errors when i am able to. Functionally, nothing is changed.

I also removed a test from exchange/bitswap/testnet that was testing unused code.

@whyrusleeping whyrusleeping added the status/in-progress In progress label May 6, 2015

// TODO: consider changing this function to not return anything
return "", nil
return bs.cancelBlocks(ctx, keys)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error probably should not be returned by ReceiveMessage, but logged or otherwise handled. AFAIK, if this fails, it does not mean a ReceiveMessage failure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(agree with the general sentiment of not hiding errors, but incorrect errors aren't good either)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm, alright

@jbenet
Copy link
Member

jbenet commented May 6, 2015

github's complaining. looks like it needs a rebase?

jbenet added a commit that referenced this pull request May 6, 2015
@jbenet jbenet merged commit 0d521ff into master May 6, 2015
@jbenet jbenet deleted the feat/bsrefactor branch May 6, 2015 09:31
@jbenet jbenet removed the status/in-progress In progress label May 6, 2015
@jbenet jbenet mentioned this pull request May 9, 2015
36 tasks
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.

2 participants