From 1a36375fa7c19ba5da11b1a7f84ee79d910742bc Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Wed, 4 Jul 2018 12:44:46 +0200 Subject: [PATCH] fix(dag): fix default hash algorithm for put() api (#1419) Turns out we've introduced a little bug in https://github.com/ipfs/js-ipfs/commit/d299ed77c288d82ce807af0ec7a5b2605336626f 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 --- src/core/components/dag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/components/dag.js b/src/core/components/dag.js index 6cdccf8885..88a80bdcce 100644 --- a/src/core/components/dag.js +++ b/src/core/components/dag.js @@ -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)