Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

WIP: feat/blocks #52

Merged
merged 13 commits into from
Jan 25, 2016
Merged

WIP: feat/blocks #52

merged 13 commits into from
Jan 25, 2016

Conversation

daviddias
Copy link
Member

issue: #50

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
@fbaiodias fbaiodias mentioned this pull request Jan 24, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
Add json loader

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
@daviddias
Copy link
Member Author

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

const fileA = isNode
? fs.readFileSync(process.cwd() + '/tests/repo-example/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')
: new Buffer(require('raw!./../repo-example/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data'))
Copy link
Member Author

Choose a reason for hiding this comment

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

bug found (this took me a bit to figure out :))

When using raw-loader, a string is returned with the contents of the file, if the file content was text, it would be ok, but since it is an encoded protobuf, it will add extra encoding data (utf8) adding extra bytes to the content of the Buffer, increasing the size of the Block and by so, failing the test. Need to get another way to load the blocks into localstorage

Copy link
Member

Choose a reason for hiding this comment

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

Maybe this could work for you? https://github.com/martijnvermaat/binary-loader

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
daviddias added a commit that referenced this pull request Jan 25, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
WIP: feat/blocks
@daviddias daviddias merged commit 71013ba into master Jan 25, 2016
@daviddias daviddias deleted the feat/blocks branch January 25, 2016 16:18
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020

Verified

This commit was signed with the committer’s verified signature. The key has expired.
karussell Peter
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants