Skip to content

findProviders should return PeerIDs #899

Closed
@Gozala

Description

@Gozala

findProviders returns { id: PeerId, multiaddrs: Multiaddr[] }

/**
* Iterates over all content routers in parallel to find providers of the given key.
*
* @param {CID} key - The CID key of the content to find
* @param {object} [options]
* @param {number} [options.timeout] - How long the query should run
* @param {number} [options.maxNumProviders] - maximum number of providers to find
* @returns {AsyncIterable<{ id: PeerId, multiaddrs: Multiaddr[] }>}
*/
async * findProviders (key, options = {}) {

While bitswap seems to assume it returns PeerIds instead. For more context please see

https://github.com/ipfs/js-ipfs-bitswap/pull/261/files#r587862380

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions