From b610b7a695b9bba95cb5b2aef331def00773bf12 Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 7 Sep 2022 10:09:05 -0400 Subject: [PATCH] Transports: Don't rekey noise params on testnet --- .../java/src/net/i2p/router/transport/ntcp/NTCPTransport.java | 2 +- router/java/src/net/i2p/router/transport/udp/UDPTransport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java index 3dd573280..60907080c 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java @@ -250,7 +250,7 @@ public class NTCPTransport extends TransportImpl { String s = null; // try to determine if we've been down for 30 days or more long minDowntime = _context.router().isHidden() ? MIN_DOWNTIME_TO_REKEY_HIDDEN : MIN_DOWNTIME_TO_REKEY; - boolean shouldRekey = _context.getEstimatedDowntime() >= minDowntime; + boolean shouldRekey = !allowLocal() && _context.getEstimatedDowntime() >= minDowntime; if (!shouldRekey) { s = ctx.getProperty(PROP_NTCP2_SP); if (s != null) { diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index 89234f2bb..70210e167 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -428,7 +428,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority String s = null; // try to determine if we've been down for 30 days or more long minDowntime = _context.router().isHidden() ? MIN_DOWNTIME_TO_REKEY_HIDDEN : MIN_DOWNTIME_TO_REKEY; - boolean shouldRekey = _context.getEstimatedDowntime() >= minDowntime; + boolean shouldRekey = !allowLocal() && _context.getEstimatedDowntime() >= minDowntime; if (!shouldRekey) { s = ctx.getProperty(PROP_SSU2_SP); if (s != null) {