-
Notifications
You must be signed in to change notification settings - Fork 106
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: helia supports additional byteProviders #276
feat: helia supports additional byteProviders #276
Conversation
try { | ||
const block = await this.#provider.get(cid, options) | ||
|
||
await this.blockstore.put(cid, block, options) |
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.
we could wrap the blockstore on put that re-hashes it to verify.
we don't need to parse the data.. we just need to verify that when we hash the block with the cid.multihash.code is the same.
add method to this class for verifying bytes. might be able to use util methods in blockstore classes/package
This is great! I've taken some of the ideas here and opened #280 which I think is a bit simpler. Let me know what you think. |
superseded by #280 |
Work for addressing issues in #274.
The direction I'm thinking with this is:
This is still a WIP, but confirmed it's working locally with:
Output: