Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

fix: import with CID version 1 #227

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

alanshaw
Copy link
Contributor

Using CID version 1 causes the raw leaves option to become true unless specified. The builder reducer was not expecting a raw leaf to be returned by ipld.get so was creating file nodes with empty data.

Improves the test to fetch the data for the CIDs created by the importer and assert the imported data is the same as the input data.

fixes ipfs/js-ipfs#1518

Using CID version 1 causes the raw leaves option to become `true` unless specified. The builder reducer was not expecting a raw leaf to be returned by ipld.get so was creating file nodes with empty data.

fixes ipfs/js-ipfs#1518

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@ghost ghost assigned alanshaw Aug 21, 2018
@ghost ghost added the status/in-progress In progress label Aug 21, 2018
Copy link
Collaborator

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

LGTM

@achingbrain achingbrain merged commit c54cdf4 into ipfs-inactive:master Aug 21, 2018
@ghost ghost removed the status/in-progress In progress label Aug 21, 2018
@achingbrain achingbrain deleted the fix/cid-version-1 branch August 21, 2018 15:23
@achingbrain
Copy link
Collaborator

Published as v0.32.3

lidel added a commit to lidel/js-ipfs-http-response that referenced this pull request Sep 21, 2018
Old CIDs were invalid as noted in:
ipfs-inactive/js-ipfs-unixfs-engine#227

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
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.

ipfs.files.add with {cidVersion: 1} returns CID of an empty file
2 participants