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

Backoff algorithm #136

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

lmatteis
Copy link

@lmatteis lmatteis commented Aug 10, 2016

An important change is inside the _closest() method, where I also store the v property found in replies. This could potentially increase memory footprint of a node. But I need to store the values somewhere to be able to compare them for the backoff algorithm.

For info on the algorithm check the newly added Expiration section here: http://bittorrent.org/beps/bep_0044.html

Discussion #135

@lmatteis
Copy link
Author

Problem with travis failing is that older versions of node don't have Buffer.equals(). Ideas?

@feross
Copy link
Member

feross commented Aug 11, 2016

@lmatteis We already depend on https://www.npmjs.com/package/buffer-equals -- you can just use that.

@lmatteis
Copy link
Author

@feross ah sweet. works!

@feross
Copy link
Member

feross commented May 15, 2018

@mafintosh Do you have any thoughts on this PR? It's been a while and I think we should merge or close at this point. I'm not familiar with the spec in question, so I'll defer to you

@mafintosh
Copy link
Contributor

Yea, I need to take a closer look. I'll try to make some time over the next week to do so

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

Successfully merging this pull request may close these issues.

None yet

4 participants