On Thursday 17 July 2008 18:04, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2008-07-17 17:04:05 +0000 (Thu, 17 Jul 2008)
> New Revision: 21173
> 
> Modified:
>    trunk/freenet/src/freenet/node/PeerManager.java
>    trunk/freenet/src/freenet/node/PeerNode.java
> Log:
> more on FOAF routing changes: exclude peers from the list we send if 
>       - they have been backed off for more than 5mins
> OR    - they have a 90+% backoff percentage
> 
> shall we consider using the uptime too?
> 
> Modified: trunk/freenet/src/freenet/node/PeerManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/PeerManager.java   2008-07-17 15:50:11 UTC 
(rev 21172)
> +++ trunk/freenet/src/freenet/node/PeerManager.java   2008-07-17 17:04:05 UTC 
(rev 21173)
> @@ -558,7 +558,7 @@
>        * @return An array of the current locations (as doubles) of all
>        * our connected peers.
>        */
> -     public double[] getPeerLocationDoubles() {
> +     public double[] getPeerLocationDoubles(boolean pruneBackedOffedPeers) {

Do we actually use this boolean?

>               double[] locs;
>               PeerNode[] conns;
>               synchronized(this) {
> @@ -567,8 +567,11 @@
>               locs = new double[conns.length];
>               int x = 0;
>               for(int i = 0; i < conns.length; i++) {
> -                     if(conns[i].isRoutable())
> -                             locs[x++] = conns[i].getLocation();
> +                     if(conns[i].isRoutable()) {
> +                             if(!conns[i].shouldBeExcludedFromPeerList()) {
> +                                     locs[x++] = conns[i].getLocation();
> +                             }
> +                     }
>               }
>               // Wipe out any information contained in the order
>               java.util.Arrays.sort(locs, 0, x);
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080802/8abb8b79/attachment.pgp>

Reply via email to