From 99b5bf96090f1b4429d5099bdf1533547e30e2fc Mon Sep 17 00:00:00 2001 From: complication Date: Sun, 5 Aug 2007 03:25:30 +0000 Subject: [PATCH] 2007-08-04 Complication * Lower the threshold between the K and L bandwidth class, so that K is now < 12 KB/s, instead of <= 16 KB/s. Hopefully this lets people with 128 kbit/s (16 KB/s) upload lines participate in routing, if they keep the default share percentage. --- history.txt | 8 +++++++- router/java/src/net/i2p/router/Router.java | 6 +++--- router/java/src/net/i2p/router/RouterVersion.java | 4 ++-- .../net/i2p/router/tunnel/pool/TunnelPeerSelector.java | 2 +- .../net/i2p/router/tunnel/pool/TunnelPoolManager.java | 10 +++++----- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/history.txt b/history.txt index 294e546a88..a2010e59be 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,10 @@ -$Id: history.txt,v 1.578 2007-07-16 15:47:57 zzz Exp $ +$Id: history.txt,v 1.579 2007-07-16 16:15:51 zzz Exp $ + +2007-08-04 Complication + * Lower the threshold between the K and L bandwidth class, + so that K is now < 12 KB/s, instead of <= 16 KB/s. + Hopefully this lets people with 128 kbit/s (16 KB/s) upload lines + participate in routing, if they keep the default share percentage. 2007-07-16 zzz * i2psnark: Add tooltip info for choked/uninterested diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index 5ec5ed8414..08469130e0 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -363,7 +363,7 @@ public class Router { // publicize our ballpark capacity - this does not affect anything at // the moment - public static final char CAPABILITY_BW16 = 'K'; + public static final char CAPABILITY_BW12 = 'K'; public static final char CAPABILITY_BW32 = 'L'; public static final char CAPABILITY_BW64 = 'M'; public static final char CAPABILITY_BW128 = 'N'; @@ -382,8 +382,8 @@ public class Router { if (_log.shouldLog(Log.WARN)) _log.warn("Adding capabilities w/ bw limit @ " + bwLim, new Exception("caps")); - if (bwLim <= 16) { - ri.addCapability(CAPABILITY_BW16); + if (bwLim < 12) { + ri.addCapability(CAPABILITY_BW12); } else if (bwLim <= 32) { ri.addCapability(CAPABILITY_BW32); } else if (bwLim <= 64) { diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 0242b68571..00705309ad 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.513 $ $Date: 2007-07-16 15:47:59 $"; + public final static String ID = "$Revision: 1.514 $ $Date: 2007-07-16 16:15:53 $"; public final static String VERSION = "0.6.1.28"; - public final static long BUILD = 16; + public final static long BUILD = 17; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java b/router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java index 5594161ce6..565ac02ff2 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java +++ b/router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java @@ -277,7 +277,7 @@ public abstract class TunnelPeerSelector { private static char[] getExcludeCaps(RouterContext ctx) { String excludeCaps = ctx.getProperty("router.excludePeerCaps", - String.valueOf(Router.CAPABILITY_BW16)); + String.valueOf(Router.CAPABILITY_BW12)); Set peers = new HashSet(); if (excludeCaps != null) { char excl[] = excludeCaps.toCharArray(); diff --git a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java index 901c0b27fb..dcd9df5b78 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java +++ b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java @@ -535,14 +535,14 @@ public class TunnelPoolManager implements TunnelManagerFacade { RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); if (info != null) { String caps = info.getCapabilities(); - if (caps.indexOf(Router.CAPABILITY_BW16) >= 0) { - return "[<16 ]"; + if (caps.indexOf(Router.CAPABILITY_BW12) >= 0) { + return "[<12 ]"; } else if (caps.indexOf(Router.CAPABILITY_BW32) >= 0) { - return "[<32 ]"; + return "[<=32 ]"; } else if (caps.indexOf(Router.CAPABILITY_BW64) >= 0) { - return "[<64 ]"; + return "[<=64 ]"; } else if (caps.indexOf(Router.CAPABILITY_BW128) >= 0) { - return "[<128]"; + return "[<=128]"; } else if (caps.indexOf(Router.CAPABILITY_BW256) >= 0) { return "[>128]"; } else {