Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit b601216

Browse files
node tests passing
1 parent 5917214 commit b601216

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"multiaddr": "^2.0.3",
3737
"multipart-stream": "^2.0.1",
3838
"ndjson": "^1.4.3",
39-
"peer-id": "^0.7.0",
40-
"peer-info": "^0.7.1",
39+
"peer-id": "^0.8.0",
40+
"peer-info": "^0.8.0",
4141
"promisify-es6": "^1.0.2",
4242
"qs": "^6.3.0",
4343
"stream-http": "^2.4.1",

src/api/block.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ module.exports = (send) => {
2727
return callback(err)
2828
}
2929
if (Buffer.isBuffer(res)) {
30-
Block.create(res, callback)
30+
callback(null, new Block(res))
3131
} else {
3232
res.pipe(bl((err, data) => {
3333
if (err) {
3434
return callback(err)
3535
}
36-
Block.create(data, callback)
36+
callback(null, new Block(data))
3737
}))
3838
}
3939
})
@@ -85,8 +85,7 @@ module.exports = (send) => {
8585
if (err) {
8686
return callback(err)
8787
}
88-
89-
Block.create(block, callback)
88+
callback(null, new Block(block))
9089
})
9190
})
9291
}

0 commit comments

Comments
 (0)