forked from I2P_Developers/i2p.i2p
The rarest-first sort is stable, so randomize the wantedPieces list to ensure a healthy swarm when you have mostly seeders.
This commit is contained in:
@ -12,6 +12,7 @@ public class Piece implements Comparable {
|
||||
public Piece(int id) {
|
||||
this.id = id;
|
||||
this.peers = new HashSet();
|
||||
this.requested = false;
|
||||
}
|
||||
|
||||
public int compareTo(Object o) throws ClassCastException {
|
||||
|
Reference in New Issue
Block a user