* 2007-02-15 0.6.1.27 released

2007-02-15  jrandom
    * Limit the whispering floodfill sends to at most 3 randomly
      chosen from the known floodfill peers
This commit is contained in:
jrandom
2007-02-15 23:25:04 +00:00
committed by zzz
parent e54b964929
commit 77310e17d1
7 changed files with 21 additions and 12 deletions

View File

@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.485 $ $Date: 2007-02-13 23:33:40 $";
public final static String VERSION = "0.6.1.26";
public final static long BUILD = 19;
public final static String ID = "$Revision: 1.486 $ $Date: 2007-02-14 16:35:44 $";
public final static String VERSION = "0.6.1.27";
public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@@ -363,6 +363,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
}
}
private static final int PEERS_TO_FLOOD = 3;
/**
* to prevent people from losing track of the floodfill peers completely, lets periodically
* send those we are connected to references to the floodfill peers that we know
@@ -370,7 +372,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
private void enqueueFloodfillMessage(RouterInfo target) {
FloodfillNetworkDatabaseFacade fac = (FloodfillNetworkDatabaseFacade)_context.netDb();
List peers = fac.getFloodfillPeers();
for (int i = 0; i < peers.size(); i++) {
Collections.shuffle(peers);
for (int i = 0; i < peers.size() && i < PEERS_TO_FLOOD; i++) {
Hash peer = (Hash)peers.get(i);
// we already sent our own info, and no need to tell them about themselves