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

ensure opts from writer is used to generate hypercore #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m4gpi
Copy link

@m4gpi m4gpi commented Jun 26, 2020

Enables per-hypercore opts to be used over default set by multifeed instance. We need this in kappa-drive for an update to hyperdrive, see here:

https://gitlab.com/coboxcoop/kappa-drive/-/merge_requests/4/diffs#a77b15c0d64cf6111e025645e562faf8ccabb9d7_427_427

We're using multifeed's writer function to generate feeds, then creating a trie and hyperdrive out of those returned feeds. This custom opts allows us to create a trie with { valueEncoding: 'binary' }, which is different to the other's feeds encodings.

@hackergrrl
Copy link
Member

Thanks for the patch! Would you be open to using opts.hypercoreOpts or opts.hypercore for the opts to be passed down to the hypercore? Since writing this module I've become a bigger fan of namespacing pass-down opts with a key, to avoid passing down things by mistake.

Could you also add a note in the README about this new opts?

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