mapa17 / Eruliaf

A BitTorrent like overlay peer simulator
GNU General Public License v3.0
1 stars 0 forks source link

Correct un/chok algorithm #36

Closed mapa17 closed 12 years ago

mapa17 commented 12 years ago

The un/chok algorithm is broken, or not implemented correctly.

How it should behave:

TFT: unchok peers that have a high upload rate even they are not interested in our pieces if both peers are in state unchok, send data Limit the number active transfers to maxTFTSlots

OU: unchok interested! peers randomly

Situtaion: We unchok a node that has a high upload rate but is not interested in our data. In the future we get an interesting piece, so the peer will change to interested and to unchok as well. We will have to evaluate the number of free maxTFTSlots and if there is no free Slot if to accept the new peer and chok and old one or not.

mapa17 commented 12 years ago

So, this commit ( https://github.com/mapa17/Eruliaf/commit/f19c918839a317e3d4d588309a13a065c1b12328 ) includes simplification of the un/chok algorithm in the Peer and Peer_C1.

The TFT Algorithm in Peer_C1 is still buggy and will be fixed next.

If the un/chok algorithm is working correctly now? Well who knows? Time will tell. Not close this issue yet.