Re: node swapping algorithm
Matthew Toseland <toad-EI5O+8PHWbJeeLb3ft/[email protected]>
| Newsgroups | gmane.network.freenet.technical |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 15 April 2008 09:28, Michael Rogers wrote: > Daniel Cheng wrote: > > 750 if(Math.abs(friendLocs[i] - myLoc) <= > > Double.MIN_VALUE*2) continue; > > What's the purpose of this check and why does it use Math.abs instead of > Location.distance? To prevent unjustified zeros when there is a race condition or other error causing there to be two nodes with the same location (e.g. when a swap ends up swapping with a direct peer). > > Cheers, > Michael _______________________________________________ Tech mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIBIOxA9rUluQ9pFARAtbDAKCsJYfpLsTcCUG1VeRuVRLcv+q7wQCgueIa t72X+YA77H92g5787KfLSsM= =B/Ex -----END PGP SIGNATURE-----