What is the purpose of the promptedNetwork logic?
- Dominant language
- TypeScript
- Stars
- 75
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
I was working on an example project and noticed some extra network calls when `cat`'ing content, which led me to the code: https://github.com/ipfs/js-ipfs-bitswap/blob/871d0d2b99635ede4b3467265a07bc44b427b414/src/index.js#L263-L270
During getMany if the content doesn't exist locally, this block is triggered along with an external search for the content. The find and connect only applies to the first cid in the getMany request and only if it doesn't exist locally.
Since there are no comments around the code I'm not clear what the goal of this is. I presume this is to be proactive about connecting to peers that have content you're looking for, is that correct? What's the reason behind only using the first cid? Is it assumed that the other cids will exist on the found providers as well?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.