We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e93189 commit 31493dcCopy full SHA for 31493dc
src/network.js
@@ -98,11 +98,10 @@ class Network {
98
}
99
100
findProviders (cid, maxProviders, callback) {
101
- // TODO
102
- // consider if we want to trickleDown maxProviders, currently this is
103
- // not an exposed option:
104
- // https://github.com/libp2p/js-libp2p-kad-dht/blob/master/src/index.js#L416
105
- this.libp2p.contentRouting.findProviders(cid, CONSTANTS.providerRequestTimeout, callback)
+ this.libp2p.contentRouting.findProviders(cid, {
+ maxTimeout: CONSTANTS.providerRequestTimeout,
+ maxNumProviders: maxProviders
+ }, callback)
106
107
108
findAndConnect (cid, callback) {
0 commit comments