Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upImplementing 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?