This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
packages/interface-ipfs-core/src Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function testGet (factory, options) {
73
73
Data : uint8ArrayFromString ( 'I am inside a Protobuf' ) ,
74
74
Links : [ ]
75
75
}
76
- cidPb = CID . createV0 ( await sha256 . digest ( dagPB . encode ( nodePb ) ) )
76
+ cidPb = CID . createV1 ( dagPB . code , await sha256 . digest ( dagPB . encode ( nodePb ) ) )
77
77
nodeCbor = {
78
78
someData : 'I am inside a Cbor object' ,
79
79
pb : cidPb
@@ -122,7 +122,7 @@ export function testGet (factory, options) {
122
122
123
123
const node = result . value
124
124
125
- const cid = CID . createV0 ( await sha256 . digest ( dagPB . encode ( node ) ) )
125
+ const cid = CID . createV1 ( dagPB . code , await sha256 . digest ( dagPB . encode ( node ) ) )
126
126
expect ( cid . equals ( cidPb ) ) . to . be . true ( )
127
127
} )
128
128
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function testStat (factory, options) {
41
41
const cid = await ipfs . object . put ( testObj )
42
42
const stats = await ipfs . object . stat ( cid )
43
43
const expected = {
44
- Hash : CID . parse ( 'QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ' ) ,
44
+ Hash : CID . parse ( 'QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ' ) . toV1 ( ) ,
45
45
NumLinks : 0 ,
46
46
BlockSize : 17 ,
47
47
LinksSize : 2 ,
You can’t perform that action at this time.
0 commit comments