-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: keep searching content after transfer failure
If a find content query is transferring content from a peer, and it fails, then resume pinging peers to get the content from another one. Ways we have seen the content transfer fail: - peer disappears during utp transfer - peer sends invalid content - peer implements utp differently For now, partially to simplify testing and architecture, we only validate one piece of content at a time. When a piece of content is returned, we prioritize starting validation. When validation has started, we pause all other activity: finding new peers, finding the content elsewhere, and validating more copies of already-found content. Those things resume only after the active validation fails. It could be nice to run validation on 2 or more copies of content at a time, but testing this would be much more complicated (at least with the current testing approach).
- Loading branch information
Showing
2 changed files
with
151 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters