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

Implementing correct Interested/Uninterested behaviour #1059

Closed
bradleyjkemp opened this issue Feb 24, 2017 · 1 comment
Closed

Implementing correct Interested/Uninterested behaviour #1059

bradleyjkemp opened this issue Feb 24, 2017 · 1 comment
Labels

Comments

@bradleyjkemp
Copy link
Contributor

@bradleyjkemp bradleyjkemp commented Feb 24, 2017

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 their peerPieces bitfield 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 _updateInterest isn't called very often so this might not be too much of a problem?

@stale

This comment has been minimized.

Copy link

@stale stale bot commented May 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 3, 2018
@feross feross added accepted and removed stale labels May 3, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.