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

fix: wait for one key to be the required key not all #490

Merged
merged 2 commits into from
Jul 2, 2019
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/bitswap/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function waitForWantlistKey (ipfs, key, opts, cb) {

setTimeout(() => { timedOut = true }, opts.timeout)

const test = () => timedOut ? true : list.Keys.every(k => k['/'] === key)
const test = () => timedOut ? true : list.Keys.some(k => k['/'] === key)
const iteratee = (cb) => ipfs.bitswap.wantlist(opts.peerId, cb)

until(test, iteratee, (err) => {
Expand Down