From 2609a4d12468dec8a066038f07edacd1974f56c8 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 22 Mar 2015 08:30:10 +0000 Subject: [PATCH] Floodfill: Don't become ff w/o ECDSA support Don't transition to non-ff when shutting down if configured true Set ff for cap P and X --- .../networkdb/kademlia/FloodfillMonitorJob.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java index 4ed44388c0..89717e7073 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java @@ -2,6 +2,7 @@ package net.i2p.router.networkdb.kademlia; import java.util.List; +import net.i2p.crypto.SigType; import net.i2p.data.Hash; import net.i2p.data.router.RouterAddress; import net.i2p.data.router.RouterInfo; @@ -67,8 +68,7 @@ class FloodfillMonitorJob extends JobImpl { } private boolean shouldBeFloodfill() { - // Only if not shutting down... - if (getContext().router().gracefulShutdownInProgress()) + if (!SigType.ECDSA_SHA256_P256.isAvailable()) return false; // Hidden trumps netDb.floodfillParticipant=true @@ -83,6 +83,10 @@ class FloodfillMonitorJob extends JobImpl { // auto from here down + // Only if not shutting down... + if (getContext().router().gracefulShutdownInProgress()) + return false; + // ARM ElG decrypt is too slow if (SystemVersion.isARM()) return false; @@ -105,8 +109,9 @@ class FloodfillMonitorJob extends JobImpl { if (ri == null) return false; char bw = ri.getBandwidthTier().charAt(0); - // Only if class N or O... - if (bw < Router.CAPABILITY_BW128 || bw > Router.CAPABILITY_BW256) + // Only if class N, O, P, X + if (bw != Router.CAPABILITY_BW128 && bw != Router.CAPABILITY_BW256 && + bw != Router.CAPABILITY_BW512 && bw != Router.CAPABILITY_BW_UNLIMITED) return false; // This list will not include ourselves... -- GitLab