-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
return done(err) | ||
this.getBlocks([key], (errs, res) => { | ||
if (errs) { | ||
return done(errs[0]) |
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.
What about all the other errs?
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.
Maybe do like the block-service
? Where getBlocks returns an object of mutlihash: { err, block}
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.
There should be max one error here, but could do the object approach
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.
+1 for object approach
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.
@diasdavid done, please give this another round of review so I can merge it soon :)
a1cede0
to
8bfbb20
Compare
Fetch multiple blocks. The `cb` is called with a result object of the form | ||
```js | ||
{ | ||
[key1]: {error: errorOrUndefined, block: blockOrUndefined}, |
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.
"key being the multihash of the block"
No description provided.