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

Commit

Permalink
fix(dag): fix default hash algorithm for put() api (#1419)
Browse files Browse the repository at this point in the history
Turns out we've introduced a little bug in d299ed7
in which the default hash algorithm has a typo.

This didn't fail on CI because the `options.hashAlg` passed down to `ipld.put()`
is actually not being used at time of this commit.

For more info see: https://github.com/ipld/js-ipld/blob/d3d78e053ebd3f8c85a8b5579715be8812773d4d/src/index.js#L236-L239

License: MIT
Signed-off-by: Pascal Precht <pascal.precht@gmail.com>
  • Loading branch information
0x-r4bbit authored and alanshaw committed Jul 4, 2018
1 parent d299ed7 commit 1a36375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/components/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function dag (self) {

const optionDefaults = {
format: 'dag-cbor',
hashAlg: 'sha2-255'
hashAlg: 'sha2-256'
}

options = options.cid ? options : Object.assign({}, optionDefaults, options)
Expand Down

0 comments on commit 1a36375

Please sign in to comment.