From 6789df50f3b94a790886dbe024821b1c88d2eca1 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 23 Feb 2011 15:58:46 +0000
Subject: [PATCH] lower the max limit

---
 history.txt                                                | 3 +++
 router/java/src/net/i2p/router/RouterVersion.java          | 2 +-
 .../net/i2p/router/tunnel/pool/ParticpatingThrottler.java  | 7 +++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/history.txt b/history.txt
index 3eaea4745..d3d016b01 100644
--- a/history.txt
+++ b/history.txt
@@ -1,3 +1,6 @@
+2011-02-23 zzz
+    * BuildHandler: Lower participating throttler max limit
+
 2011-02-22 zzz
     * BuildHandler: Prelmiinary participating tunnel throttler
     * I2PTunnel:
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index 098e16d49..14408f1ed 100644
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -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 = 17;
+    public final static long BUILD = 18;
 
     /** for example "-test" */
     public final static String EXTRA = "-rc";
diff --git a/router/java/src/net/i2p/router/tunnel/pool/ParticpatingThrottler.java b/router/java/src/net/i2p/router/tunnel/pool/ParticpatingThrottler.java
index 06d682679..cf07ec954 100644
--- a/router/java/src/net/i2p/router/tunnel/pool/ParticpatingThrottler.java
+++ b/router/java/src/net/i2p/router/tunnel/pool/ParticpatingThrottler.java
@@ -19,6 +19,9 @@ import net.i2p.util.SimpleTimer;
  * This also effectively limits the number of tunnels between
  * any given pair of routers, which probably isn't a bad thing.
  *
+ * Note that the actual limits will be higher than specified
+ * by up to 1 / LIFETIME_PORTION because the counter window resets.
+ *
  * Note that the counts are of previous + next hops, so the total will
  * be higher than the participating tunnel count, and will also grow
  * as the network uses more 3-hop tunnels.
@@ -32,9 +35,9 @@ class ParticipatingThrottler {
     /** portion of the tunnel lifetime */
     private static final int LIFETIME_PORTION = 3;
     private static final int MIN_LIMIT = 18 / LIFETIME_PORTION;
-    private static final int MAX_LIMIT = 81 / LIFETIME_PORTION;
+    private static final int MAX_LIMIT = 66 / LIFETIME_PORTION;
     private static final int PERCENT_LIMIT = 12 / LIFETIME_PORTION;
-    private static final long CLEAN_TIME = 10*60*1000 / LIFETIME_PORTION;
+    private static final long CLEAN_TIME = 11*60*1000 / LIFETIME_PORTION;
 
     ParticipatingThrottler(RouterContext ctx) {
         this.context = ctx;
-- 
GitLab