mapa17 / Eruliaf

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

PeerC1: do not select Seeders for TFT #70

Closed mapa17 closed 12 years ago

mapa17 commented 12 years ago

In some cases nodes select the seeder/other seeders for TFT Slots. This is not really useful.

Change this in the PeerC1, in the Peer too?

mapa17 commented 12 years ago

Make this concept more general. Dond return peers that have completed their download by Peer.getOUCandidates() and Peer.getTFTCandidates() .

mapa17 commented 12 years ago

Oj! Holy ****.

The chock/unchocking protocol specification states that TFT Candidates have to be interested. This was not the case up till now. ( http://wiki.theory.org/BitTorrentSpecification#Choking_and_Optimistic_Unchoking )

So Peer.getTFTCandidates() will only return interested peers ( excluding Seeders ) Peer.getOUCandidates() will return peers that are not currently TFT scheduled and are no seeders. Uninterested peers are still returned. This is needed in the beginning of the simulation where peers have no interest in each other.

The PeerC1 algorithm will than prefer interested Peers in OU slots but will take all others if it cant find enough of them.