Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesImplementing correct Interested/Uninterested behaviour #1059
Labels
Comments
This comment has been minimized.
This comment has been minimized.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.

Hi, I'm going to try and add (more) correct interested/uninterested behaviour i.e. only marking a peer as interested if they actually have a piece that we want. Here was my first idea:
In
Torrent.prototype._updateInterest, for each wire iterate through theirpeerPiecesbitfield and mark them as interested if they have any piece which we do not currently have.Is this too inefficient? It would mean #peers * #pieces complexity but from what I can see
_updateInterestisn't called very often so this might not be too much of a problem?