-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ipfs.dht.findprovs is passing cb in timeout position to libp2p findProviders #1322
Comments
@olizilla wanna submit a PR to fix that? thanks for reporting :) |
Sure! I think an ideal fix for this would result in a change to the
interface; the caller to findprovs should be able to pass in options to
specify a timeout duration.
Is that a reasonable approach @diasdavid ? What's the proceedure for
proposing an interface change?
…On Mon, 30 Apr 2018, 08:29 David Dias, ***@***.***> wrote:
@olizilla <https://github.com/olizilla> wanna submit a PR to fix that?
thanks for reporting :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1322 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADl91Lg5yQZtOBMfc8_absj--wDsegnks5ttr1GgaJpZM4Tf9NF>
.
|
The drill is to makes sure there is a PR and a test that standardizes the API call on https://github.com/ipfs/interface-ipfs-core and that it passes both js-ipfs and js-ipfs-api. Thanks @olizilla 👍 |
@olizilla have you started implementing this already, or do you need any help with this? |
@PascalPrecht I haven't started on this, please feel free to PR it if you're looking at it! |
@olizilla I'll do that. @diasdavid just to clarify the API. We wanna turn:
to
where |
I guess on that note, we will have to introduce a decent default for |
@alanshaw do you know what the As https://github.com/libp2p/js-libp2p/blob/03faf69212b0f3501291527f85b2bb85a8c5427e/src/content-routing.js#L5 expects I would also update |
Unless we want to explicitly set a default when not provided (IMHO I don't think we need to) I'd leave it to the implementation to set an appropriate value (you can pass |
Ah perfect, okay. Thanks! |
As discussed in: ipfs/js-ipfs#1322 (comment) License: MIT Signed-off-by: Pascal Precht <[email protected]>
This is to complement: ipfs-inactive/interface-js-ipfs-core#337 Fixes ipfs#1322
As discussed in: ipfs/js-ipfs#1322 (comment) License: MIT Signed-off-by: Pascal Precht <[email protected]>
As discussed in: ipfs/js-ipfs#1322 (comment) License: MIT Signed-off-by: Pascal Precht <[email protected]>
This is to complement: ipfs-inactive/interface-js-ipfs-core#337 Fixes ipfs#1322
As discussed in: ipfs/js-ipfs#1322 (comment) License: MIT Signed-off-by: Pascal Precht <[email protected]>
This is to complement: ipfs-inactive/interface-js-ipfs-core#337 Fixes #1322
* feat(dht): add API to allow options in `findprovs()` As discussed in: ipfs/js-ipfs#1322 (comment) License: MIT Signed-off-by: Pascal Precht <[email protected]> * fix: typo in test name License: MIT Signed-off-by: Alan Shaw <[email protected]>
Type: Bug
Severity: High
Description:
ipfs.dht.findprovs
is passingcb
intimeout
position to libp2pfindProviders
, and so the call fails to return anything.In the dht component in js-ipfs
js-ipfs/src/core/components/dht.js
Line 64 in 37801c1
and the js-libp2p findProviders impl https://github.com/libp2p/js-libp2p/blob/03faf69212b0f3501291527f85b2bb85a8c5427e/src/content-routing.js#L5
Steps to reproduce the error:
In a browser with ipfs-companion installed and pointing at an embedded ipfs node:
The text was updated successfully, but these errors were encountered: