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(graphsync): support extension protocol #42

Merged
merged 2 commits into from
Nov 11, 2019
Merged

Conversation

hannahhoward
Copy link
Collaborator

Goals

Bring implementation in line with spec, specifically ipld/specs#205

Implementation

Metadata is now an extension, and further extensions will be added soon

Per ipld/specs#205, metadata is now an extension, and further extensions
will be added soon
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

general LGTM but I haven't tested this locally or gone over it with a fine-toothed comb.

I really like the use of strong typing.

if !ok {
return nil, ErrExtensionNotPresent
}
return val, nil
Copy link
Member

Choose a reason for hiding this comment

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

Consider returning ([]byte, bool), leaving the interpretation of whether the missing value is an "error" up to the caller.

return a boolean instead of an error if an extention is found on a message
@hannahhoward hannahhoward merged commit 65b11b7 into master Nov 11, 2019
@mvdan mvdan deleted the feat/extensions branch December 15, 2021 14:15
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.

3 participants