Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return stream for Ipfs::get_providers #14

Closed
dariusc93 opened this issue Nov 25, 2022 · 1 comment
Closed

Return stream for Ipfs::get_providers #14

dariusc93 opened this issue Nov 25, 2022 · 1 comment
Assignees
Labels
p:low Low Priority

Comments

@dariusc93
Copy link
Owner

dariusc93 commented Nov 25, 2022

rust-libp2p merged changes in libp2p/rust-libp2p#2712 that would allow get_providers to return in real time when polling the swarm, so what will likely need to be done is to create a stream when calling Ipfs::get_providers and allow one to poll the stream for the peers found providing the key.

Question:

  1. After testing, it looks like i can only call get_providers in libp2p once to receive everything in real time but only up to a specific point (though i will test again since I was checking for a specific key in the swarm). Should we continue to only call it once once this implemented or should we call it on an interval internally?

The event is only emitted until the query is finished earlier or until GetProvidersOk::FinishedWithNoAdditionalRecord is emitted with the ProgressStep::last being true. In this case we will stop the stream once the swarm provide this event.

@dariusc93 dariusc93 added question Further information is requested p:low Low Priority labels Nov 25, 2022
@dariusc93 dariusc93 removed the question Further information is requested label Dec 7, 2022
@dariusc93 dariusc93 self-assigned this Dec 7, 2022
@dariusc93
Copy link
Owner Author

Resolved in 7f2ee70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p:low Low Priority
Projects
None yet
Development

No branches or pull requests

1 participant