forked from I2P_Developers/i2p.i2p
NetDB: Increase min floodfill version
This commit is contained in:
@@ -194,7 +194,8 @@ class FloodfillVerifyStoreJob extends JobImpl {
|
||||
break;
|
||||
Hash peer = peers.get(0);
|
||||
RouterInfo ri = _facade.lookupRouterInfoLocally(peer);
|
||||
if (ri != null && StoreJob.supportsCert(ri, keyCert)) {
|
||||
//if (ri != null && StoreJob.supportsCert(ri, keyCert)) {
|
||||
if (ri != null && StoreJob.shouldStoreTo(ri)) {
|
||||
Set<String> peerIPs = new MaskedIPSet(getContext(), ri, IP_CLOSE_BYTES);
|
||||
if (!_ipSet.containsAny(peerIPs)) {
|
||||
_ipSet.addAll(peerIPs);
|
||||
@@ -205,7 +206,7 @@ class FloodfillVerifyStoreJob extends JobImpl {
|
||||
}
|
||||
} else {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info(getJobId() + ": Skipping verify w/ router that doesn't support key certs " + peer);
|
||||
_log.info(getJobId() + ": Skipping verify w/ router that is too old " + peer);
|
||||
}
|
||||
_ignore.add(peer);
|
||||
}
|
||||
|
@@ -120,6 +120,9 @@ public class IterativeSearchJob extends FloodSearchJob {
|
||||
!SystemVersion.isApache() && !SystemVersion.isGNU() &&
|
||||
NativeBigInteger.isNative();
|
||||
|
||||
//private static final String MIN_QUERY_VERSION = SigType.EdDSA_SHA512_Ed25519.getSupportedSince();
|
||||
private static final String MIN_QUERY_VERSION = StoreJob.MIN_STORE_VERSION;
|
||||
|
||||
/**
|
||||
* Lookup using exploratory tunnels
|
||||
*/
|
||||
@@ -319,7 +322,7 @@ public class IterativeSearchJob extends FloodSearchJob {
|
||||
// This is also more recent than the version that supports encrypted replies,
|
||||
// so we won't request unencrypted replies anymore either.
|
||||
String v = ri.getVersion();
|
||||
String since = SigType.EdDSA_SHA512_Ed25519.getSupportedSince();
|
||||
String since = MIN_QUERY_VERSION;
|
||||
if (VersionComparator.comp(v, since) < 0) {
|
||||
failed(peer, false);
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
|
@@ -173,6 +173,14 @@ class StoreJob extends JobImpl {
|
||||
_log.info(getJobId() + ": Error selecting closest hash that wasnt a router! " + peer + " : " + ds);
|
||||
_state.addSkipped(peer);
|
||||
skipped++;
|
||||
} else if (!shouldStoreTo((RouterInfo)ds)) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info(getJobId() + ": Skipping old router " + peer);
|
||||
_state.addSkipped(peer);
|
||||
skipped++;
|
||||
/****
|
||||
above shouldStoreTo() check is newer than these two checks, so we're covered
|
||||
|
||||
} else if (_state.getData().getType() == DatabaseEntry.KEY_TYPE_LEASESET &&
|
||||
!supportsCert((RouterInfo)ds,
|
||||
((LeaseSet)_state.getData()).getDestination().getCertificate())) {
|
||||
@@ -187,6 +195,7 @@ class StoreJob extends JobImpl {
|
||||
_log.info(getJobId() + ": Skipping router that doesn't support big leasesets " + peer);
|
||||
_state.addSkipped(peer);
|
||||
skipped++;
|
||||
****/
|
||||
} else {
|
||||
int peerTimeout = _facade.getPeerTimeout(peer);
|
||||
|
||||
@@ -525,6 +534,7 @@ class StoreJob extends JobImpl {
|
||||
* @return true if not a key cert
|
||||
* @since 0.9.12
|
||||
*/
|
||||
/****
|
||||
public static boolean supportsCert(RouterInfo ri, Certificate cert) {
|
||||
if (cert.getCertificateType() != Certificate.CERTIFICATE_TYPE_KEY)
|
||||
return true;
|
||||
@@ -542,15 +552,29 @@ class StoreJob extends JobImpl {
|
||||
}
|
||||
|
||||
private static final String MIN_BIGLEASESET_VERSION = "0.9";
|
||||
****/
|
||||
|
||||
/**
|
||||
* Does he support more than 6 leasesets?
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public static boolean supportsBigLeaseSets(RouterInfo ri) {
|
||||
/****
|
||||
private static boolean supportsBigLeaseSets(RouterInfo ri) {
|
||||
String v = ri.getVersion();
|
||||
return VersionComparator.comp(v, MIN_BIGLEASESET_VERSION) >= 0;
|
||||
}
|
||||
****/
|
||||
|
||||
public static final String MIN_STORE_VERSION = "0.9.28";
|
||||
|
||||
/**
|
||||
* Is it too old?
|
||||
* @since 0.9.33
|
||||
*/
|
||||
static boolean shouldStoreTo(RouterInfo ri) {
|
||||
String v = ri.getVersion();
|
||||
return VersionComparator.comp(v, MIN_STORE_VERSION) >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after sending a dbStore to a peer successfully,
|
||||
|
Reference in New Issue
Block a user