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

feat: add unwantBlocks method #10

Merged
merged 5 commits into from
May 9, 2016
Merged

feat: add unwantBlocks method #10

merged 5 commits into from
May 9, 2016

Conversation

dignifiedquire
Copy link
Member

No description provided.

return done(err)
this.getBlocks([key], (errs, res) => {
if (errs) {
return done(errs[0])
Copy link
Member

Choose a reason for hiding this comment

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

What about all the other errs?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe do like the block-service? Where getBlocks returns an object of mutlihash: { err, block}

Copy link
Member Author

@dignifiedquire dignifiedquire May 6, 2016

Choose a reason for hiding this comment

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

There should be max one error here, but could do the object approach

Copy link
Member

Choose a reason for hiding this comment

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

+1 for object approach

Copy link
Member Author

Choose a reason for hiding this comment

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

@diasdavid done, please give this another round of review so I can merge it soon :)

Fetch multiple blocks. The `cb` is called with a result object of the form
```js
{
[key1]: {error: errorOrUndefined, block: blockOrUndefined},
Copy link
Member

Choose a reason for hiding this comment

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

"key being the multihash of the block"

@dignifiedquire dignifiedquire merged commit 4b337cc into master May 9, 2016
@dignifiedquire dignifiedquire deleted the feat/unwantBlocks branch May 9, 2016 09:59
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