Closed alanshaw closed 5 years ago
The CID v1 -> rawLeaves
enablement is to mirror what Go does in order to generate the same hashes for a given file. I guess we need to ask ourselves if we want to continue having these sort of side-effects in the codebase.
LGTM but I'll hold off merging until multiformats/js-cid/pull/73 is in and we can remove the git url from the package.json
here.
Will re-submit a new PR
BREAKING CHANGE: The module now creates and returns v1 CIDs which are base32 encoded by default. Also
rawLeaves
is set totrue
by default.refs https://github.com/ipfs/js-ipfs/issues/1440
Interesting side effect - using CID v1 enables the
rawLeaves
option so the node sizes actually get smaller (I was expecting bigger nodes because of the extra version info in the CID of the links and didn't anticipaterawLeaves
getting enabled).