Skip to content

Commit a9a0485

Browse files
authored
Merge pull request #144 from ipfs/chore/repo-new-api
feat: adapted to new ipfs-repo API
2 parents 80ecabe + 6fc548b commit a9a0485

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/components/decision-engine/index-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = (repo) => {
4040
if (err) {
4141
return done(err)
4242
}
43-
const blockstore = results[0].blockstore
43+
const blockstore = results[0].blocks
4444
const engine = new DecisionEngine(blockstore, net || mockNetwork())
4545
engine.start()
4646

@@ -167,7 +167,7 @@ module.exports = (repo) => {
167167
hashes.map((h, i) => {
168168
return new Block(new Buffer(alphabet[i]), new CID(h))
169169
}),
170-
(b, cb) => repo.blockstore.put(b, cb),
170+
(b, cb) => repo.blocks.put(b, cb),
171171
cb
172172
),
173173
(cb) => eachSeries(_.range(numRounds), (i, cb) => {
@@ -186,7 +186,7 @@ module.exports = (repo) => {
186186
innerCb()
187187
})
188188

189-
const dEngine = new DecisionEngine(repo.blockstore, network)
189+
const dEngine = new DecisionEngine(repo.blocks, network)
190190
dEngine.start()
191191

192192
let partner

test/index-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module.exports = (repo) => {
6060
return done(err)
6161
}
6262

63-
store = results[0].blockstore
63+
store = results[0].blocks
6464
blocks = results[1]
6565
ids = results[2]
6666

@@ -285,7 +285,7 @@ module.exports = (repo) => {
285285
waterfall([
286286
(cb) => repo.create('world', cb),
287287
(repo, cb) => {
288-
store2 = repo.blockstore
288+
store2 = repo.blocks
289289
bs2 = new Bitswap(libp2pMock, store2, new PeerBook())
290290
utils.applyNetwork(bs2, n2)
291291
bs2.start()

test/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ exports.genBitswapNetwork = (n, callback) => {
165165
// create every BitSwap
166166
function createBitswaps () {
167167
netArray.forEach((net) => {
168-
net.bitswap = new Bitswap(net.libp2p, net.repo.blockstore, net.peerBook)
168+
net.bitswap = new Bitswap(net.libp2p, net.repo.blocks, net.peerBook)
169169
})
170170
establishLinks()
171171
}

0 commit comments

Comments
 (0)