forked from I2P_Developers/i2p.i2p
* 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:
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user