Don't count peers we can't connect to for rarest-first calculations.

This commit is contained in:
ragnarok
2005-10-20 23:28:32 +00:00
committed by zzz
parent 0b9e4967a0
commit 8458e4e0af
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,7 @@ public class Piece implements Comparable {
public int getId() { return this.id; }
public Set getPeers() { return this.peers; }
public boolean addPeer(Peer peer) { return this.peers.add(peer.getPeerID()); }
public boolean removePeer(Peer peer) { return this.peers.remove(peer.getPeerID()); }
public boolean isRequested() { return this.requested; }
public void setRequested(boolean requested) { this.requested = requested; }
}