This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Commit 3b33c1a
committed
test(dag): add test to verify put API overrides hash algorithm
As discussed in ipfs/js-ipfs#1419 (comment)
at the time of this commit, `dag.put()` basically ignores the `hashAlg`
option, as it passes it down to `ipld.put()`, which won't honor it until
ipld/js-ipld#133 is merged.
Once ipld/js-ipld#133 is merged, this test verifies
that e.g.
```
dag.put(cborNode, {
format: 'dag-cbor',
hashAlg: 'sha3-512'
}, (err, cid) => {
...
})
```
Actually results in a `CID` instance that decodes to `sha3-512` and not
the `sha2-256` default.
License: MIT
Signed-off-by: Pascal Precht pascal.precht@gmail.com1 parent 7660e0f commit 3b33c1a
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
112 | 124 | | |
113 | 125 | | |
114 | 126 | | |
| |||
0 commit comments