I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a8499639 authored by zzz's avatar zzz
Browse files

Reseed: Enforce minimum version for bundling

parent 7b872474
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ import net.i2p.data.Hash;
import net.i2p.data.router.RouterAddress;
import net.i2p.data.router.RouterInfo;
import net.i2p.router.RouterContext;
import net.i2p.util.VersionComparator;
/**
* Copy a random selection of 'count' router infos from configDir/netDb
......@@ -46,6 +47,8 @@ public class ReseedBundler {
private final static String ROUTERINFO_PREFIX = "routerInfo-";
private final static String ROUTERINFO_SUFFIX = ".dat";
private static final int MINIMUM = 50;
/** NTCP2 */
private static final String MIN_VERSION = "0.9.36";
public ReseedBundler(RouterContext ctx) {
_context = ctx;
......@@ -83,6 +86,8 @@ public class ReseedBundler {
continue;
if (ri.getCapabilities().contains("K"))
continue;
if (VersionComparator.comp(ri.getVersion(), MIN_VERSION) < 0)
continue;
Collection<RouterAddress> addrs = ri.getAddresses();
if (addrs.isEmpty())
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment