From b80505f3aeb120464b5f6694b9db7d7b21836ec0 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Wed, 18 Oct 2023 12:28:56 -0400 Subject: [PATCH] Router: bypass throttle when lookup sent to client DB --- .../kademlia/FloodfillNetworkDatabaseFacade.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java index 9835e4311b..2137bcb009 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java @@ -252,11 +252,21 @@ boolean shouldThrottleFlood(Hash key) { * @since 0.7.11 */ boolean shouldThrottleLookup(Hash from, TunnelId id) { + if (isClientDb()) { + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Lookup for:" + from + " sent to a client DB: "+_dbid.toString()+", bypassing throttle"); + return false; + } // null before startup return _lookupThrottler == null || _lookupThrottler.shouldThrottle(from, id); } boolean shouldThrottleBurstLookup(Hash from, TunnelId id) { + if (isClientDb()) { + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Lookup for:" + from + " sent to a client DB: "+_dbid.toString()+", bypassing throttle"); + return false; + } // null before startup return _lookupThrottlerBurst == null || _lookupThrottlerBurst.shouldThrottle(from, id); }