forked from I2P_Developers/i2p.i2p
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
This commit is contained in:
@@ -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...
|
||||
|
Reference in New Issue
Block a user