* PeerManager: Restore profileOrganizer.sameCountryBonus advanced config,

inadvertently removed in 0.9.10
This commit is contained in:
zzz
2014-03-08 16:03:35 +00:00
parent d6a02a13ad
commit 1f5926e4e9
3 changed files with 8 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 15;
public final static long BUILD = 16;
/** for example "-test" */
public final static String EXTRA = "";

View File

@@ -22,7 +22,7 @@ class CapacityCalculator {
// crappy peers start at 1 and the base is 5.
private static final double BONUS_NEW = 0.85;
private static final double BONUS_ESTABLISHED = 0.65;
private static final double BONUS_SAME_COUNTRY = 0.10;
private static final double BONUS_SAME_COUNTRY = 0;
private static final double BONUS_XOR = .25;
private static final double PENALTY_UNREACHABLE = 2;
@@ -67,7 +67,7 @@ class CapacityCalculator {
// boost connected peers
if (profile.isEstablished())
capacity += BONUS_ESTABLISHED;
/****
// boost same country
if (profile.isSameCountry()) {
double bonus = BONUS_SAME_COUNTRY;
@@ -79,7 +79,7 @@ class CapacityCalculator {
}
capacity += bonus;
}
****/
// penalize unreachable peers
if (profile.wasUnreachable())
capacity -= PENALTY_UNREACHABLE;