Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bitswap 1.1.0 and bitswap 1.0.0 using CID #76

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4384208
add new protobuf
daviddias Dec 7, 2016
b15fb89
docs: move API docs to readme
daviddias Dec 7, 2016
effdbe2
fix: string is not the same as bytes in JS
daviddias Dec 7, 2016
ae95bbe
feat: update wantlist to support cid
daviddias Dec 7, 2016
84abea9
wip: bitswap message
daviddias Dec 7, 2016
99d64dd
feat: cid support in Bitswap message
daviddias Dec 7, 2016
cebd4b2
docs: add some notes to the readme about what is the code structure
daviddias Dec 7, 2016
3189db6
test: cidV1 test in wantlist
daviddias Dec 7, 2016
8758da6
feat: update wantmanager msg-queue to use cid
daviddias Dec 8, 2016
fd60a9c
feat: wantmanager uses cid
daviddias Dec 10, 2016
e7835cb
chore: refactor structure to make it more explicit what is which thin…
daviddias Dec 10, 2016
de99976
docs: add architecture graph
daviddias Dec 10, 2016
8e3b7a7
cr: apply CR
daviddias Dec 10, 2016
d15910d
feat: priority-queue done
daviddias Dec 10, 2016
c17f410
feat: PeerRequestQueue with CID support
daviddias Dec 10, 2016
89d922e
feat: upgrade ledger to use CID
daviddias Dec 10, 2016
65dbd28
feat: decision engine migration to CID (just missing one test)
daviddias Dec 11, 2016
a8da40a
fix engine tests
dignifiedquire Dec 11, 2016
0dc3b60
use .multihash intead of toV0
dignifiedquire Dec 12, 2016
32e8997
feat: update network to understand CID
daviddias Dec 16, 2016
beff8d1
upgrade message to support bitswap 1.0.0 and 1.1.0 simultaneously, also
daviddias Dec 16, 2016
3dc3493
feat: upgrade network component to support bitswap 1.0.0 and bitwap 1…
daviddias Dec 18, 2016
e892863
feat: update bitswap own API
daviddias Dec 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use .multihash intead of toV0
  • Loading branch information
dignifiedquire committed Dec 12, 2016
commit 0dc3b605479a25efc3c3e8ff4bb779910a230a5b
4 changes: 2 additions & 2 deletions src/components/decision-engine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DecisionEngine {
log('got task')

pull(
this.blockstore.getStream(nextTask.entry.cid.toV0()),
this.blockstore.getStream(nextTask.entry.cid.multihash),
pull.collect((err, blocks) => {
log('collected block', blocks, err)
const block = blocks[0]
Expand Down Expand Up @@ -167,7 +167,7 @@ class DecisionEngine {
ledger.wants(entry.cid, entry.priority)

// If we already have the block, serve it
this.blockstore.has(entry.cid.toV0(), (err, exists) => {
this.blockstore.has(entry.cid.multihash, (err, exists) => {
if (err) {
log('failed existence check %s', cidStr)
} else if (exists) {
Expand Down