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

Commit

Permalink
fixup! feat!: update interface-ipfs-core DAG API to match go-ipfs@0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Nov 15, 2021
1 parent 8392690 commit 6720722
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/interface-ipfs-core/src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function testGet (factory, options) {
Data: uint8ArrayFromString('I am inside a Protobuf'),
Links: []
}
cidPb = CID.createV0(await sha256.digest(dagPB.encode(nodePb)))
cidPb = CID.createV1(dagPB.code, await sha256.digest(dagPB.encode(nodePb)))
nodeCbor = {
someData: 'I am inside a Cbor object',
pb: cidPb
Expand Down Expand Up @@ -122,7 +122,7 @@ export function testGet (factory, options) {

const node = result.value

const cid = CID.createV0(await sha256.digest(dagPB.encode(node)))
const cid = CID.createV1(dagPB.code, await sha256.digest(dagPB.encode(node)))
expect(cid.equals(cidPb)).to.be.true()
})

Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/object/stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function testStat (factory, options) {
const cid = await ipfs.object.put(testObj)
const stats = await ipfs.object.stat(cid)
const expected = {
Hash: CID.parse('QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ'),
Hash: CID.parse('QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ').toV1(),
NumLinks: 0,
BlockSize: 17,
LinksSize: 2,
Expand Down

0 comments on commit 6720722

Please sign in to comment.