Skip to content

WIP: adapted to new ipfs-repo API #144

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

Merged
merged 1 commit into from
Jul 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions test/components/decision-engine/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = (repo) => {
if (err) {
return done(err)
}
const blockstore = results[0].blockstore
const blockstore = results[0].blocks
const engine = new DecisionEngine(blockstore, net || mockNetwork())
engine.start()

Expand Down Expand Up @@ -167,7 +167,7 @@ module.exports = (repo) => {
hashes.map((h, i) => {
return new Block(new Buffer(alphabet[i]), new CID(h))
}),
(b, cb) => repo.blockstore.put(b, cb),
(b, cb) => repo.blocks.put(b, cb),
cb
),
(cb) => eachSeries(_.range(numRounds), (i, cb) => {
Expand All @@ -186,7 +186,7 @@ module.exports = (repo) => {
innerCb()
})

const dEngine = new DecisionEngine(repo.blockstore, network)
const dEngine = new DecisionEngine(repo.blocks, network)
dEngine.start()

let partner
Expand Down
4 changes: 2 additions & 2 deletions test/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = (repo) => {
return done(err)
}

store = results[0].blockstore
store = results[0].blocks
blocks = results[1]
ids = results[2]

Expand Down Expand Up @@ -285,7 +285,7 @@ module.exports = (repo) => {
waterfall([
(cb) => repo.create('world', cb),
(repo, cb) => {
store2 = repo.blockstore
store2 = repo.blocks
bs2 = new Bitswap(libp2pMock, store2, new PeerBook())
utils.applyNetwork(bs2, n2)
bs2.start()
Expand Down
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ exports.genBitswapNetwork = (n, callback) => {
// create every BitSwap
function createBitswaps () {
netArray.forEach((net) => {
net.bitswap = new Bitswap(net.libp2p, net.repo.blockstore, net.peerBook)
net.bitswap = new Bitswap(net.libp2p, net.repo.blocks, net.peerBook)
})
establishLinks()
}
Expand Down