This repository was archived by the owner on Aug 11, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " ipfs-block-service" ,
3
3
"version" : " 0.5.0" ,
4
4
"description" : " JavaScript Implementation of BlockService" ,
5
- "main" : " src /index.js" ,
5
+ "main" : " lib /index.js" ,
6
6
"jsnext:main" : " src/index.js" ,
7
7
"scripts" : {
8
8
"lint" : " aegir-lint" ,
42
42
"chai" : " ^3.5.0" ,
43
43
"fs-pull-blob-store" : " ^0.3.0" ,
44
44
"idb-pull-blob-store" : " ^0.5.1" ,
45
- "ipfs-block" : " ^0.3 .0" ,
46
- "ipfs-repo" : " ^0.9 .0" ,
45
+ "ipfs-block" : " ^0.4 .0" ,
46
+ "ipfs-repo" : " ^0.10 .0" ,
47
47
"lodash" : " ^4.15.0" ,
48
48
"ncp" : " ^2.0.0" ,
49
49
"pre-commit" : " ^1.1.3" ,
50
50
"rimraf" : " ^2.5.4" ,
51
51
"run-series" : " ^1.1.4"
52
52
},
53
53
"dependencies" : {
54
+ "cids" : " ^0.2.0" ,
54
55
"pull-stream" : " ^3.4.5" ,
55
56
"run-parallel-limit" : " ^1.0.3"
56
57
},
Original file line number Diff line number Diff line change @@ -207,14 +207,17 @@ module.exports = (repo) => {
207
207
const bitswap = {
208
208
getStream ( key ) {
209
209
return pull . values ( [
210
- new Block ( key )
210
+ new Block ( 'secret' )
211
211
] )
212
212
}
213
213
}
214
214
215
215
bs . goOnline ( bitswap )
216
216
217
- bs . get ( 'secret' , ( err , block ) => {
217
+ const block = new Block ( 'secret' )
218
+ const cid = new CID ( block . key ( 'sha2-256' ) )
219
+
220
+ bs . get ( cid , ( err , block ) => {
218
221
expect ( err ) . to . not . exist
219
222
expect ( block . data ) . to . be . eql ( new Block ( 'secret' ) . data )
220
223
done ( )
You can’t perform that action at this time.
0 commit comments