File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 77
77
"ipfs-block" : " ~0.8.0" ,
78
78
"just-debounce-it" : " ^1.1.0" ,
79
79
"moving-average" : " ^1.0.0" ,
80
- "multicodec" : " ~0.5.0 " ,
80
+ "multicodec" : " ~0.5.7 " ,
81
81
"multihashing-async" : " ^0.8.0" ,
82
82
"protons" : " ^1.0.1" ,
83
83
"pull-length-prefixed" : " ^1.3.1" ,
Original file line number Diff line number Diff line change 3
3
const protons = require ( 'protons' )
4
4
const Block = require ( 'ipfs-block' )
5
5
const CID = require ( 'cids' )
6
- const codecName = require ( 'multicodec/src/name-table ' )
6
+ const { getName } = require ( 'multicodec' )
7
7
const vd = require ( 'varint-decoder' )
8
8
const multihashing = require ( 'multihashing-async' )
9
9
const { isMapEqual } = require ( '../../utils' )
@@ -159,7 +159,7 @@ BitswapMessage.deserialize = async (raw) => {
159
159
const hashAlg = values [ 2 ]
160
160
// const hashLen = values[3] // We haven't need to use this so far
161
161
const hash = await multihashing ( p . data , hashAlg )
162
- const cid = new CID ( cidVersion , codecName [ multicodec . toString ( '16' ) ] , hash )
162
+ const cid = new CID ( cidVersion , getName ( multicodec ) , hash )
163
163
msg . addBlock ( new Block ( p . data , cid ) )
164
164
} ) )
165
165
return msg
You can’t perform that action at this time.
0 commit comments