Router: Allow class M to become floodfill;

add bandwidth classes P and X (ticket #1447)
This commit is contained in:
zzz
2015-05-03 17:35:09 +00:00
parent 707bfbbf8b
commit b5f75a4bb9
4 changed files with 8 additions and 7 deletions

View File

@ -898,14 +898,12 @@ public class Router implements RouterClock.ClockShiftListener {
} else if (bwLim <= 2000) { // TODO adjust threshold
// 512 supported as of 0.9.18;
// Add 256 as well for compatibility
// TODO uncomment
//ri.addCapability(CAPABILITY_BW512);
ri.addCapability(CAPABILITY_BW512);
ri.addCapability(CAPABILITY_BW256);
} else {
// Unlimited supported as of 0.9.18;
// Add 256 as well for compatibility
// TODO uncomment
//ri.addCapability(CAPABILITY_BW_UNLIMITED);
ri.addCapability(CAPABILITY_BW_UNLIMITED);
ri.addCapability(CAPABILITY_BW256);
}

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 = 13;
public final static long BUILD = 14;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -109,8 +109,9 @@ class FloodfillMonitorJob extends JobImpl {
if (ri == null)
return false;
char bw = ri.getBandwidthTier().charAt(0);
// Only if class N, O, P, X
if (bw != Router.CAPABILITY_BW128 && bw != Router.CAPABILITY_BW256 &&
// Only if class M, N, O, P, X
if (bw != Router.CAPABILITY_BW64 &&
bw != Router.CAPABILITY_BW128 && bw != Router.CAPABILITY_BW256 &&
bw != Router.CAPABILITY_BW512 && bw != Router.CAPABILITY_BW_UNLIMITED)
return false;