On Jan 4, 2008, at 8:53 AM, Matthew Toseland wrote:
> location > 1.0 is possible if the node set it too high and told us,
> no?
No... AFAICS currentLocation is private, the only time it is not set
to a constant (-1) is from "Location.getLocation(locationString);" or
"updateLocation(double newLoc);".
updateLocation() has an explicit guard against setting it beyond 0&1,
and getLocation() will throw a parse exception if it is beyond 0&1.
In fact, rather than setting currentLocation to -1, we could probably
set isRoutable=false and it would be even simpler.
--
Robert Hailey
> On Friday 04 January 2008 01:53, you wrote:
>> Author: robert
>> Date: 2008-01-04 01:53:40 +0000 (Fri, 04 Jan 2008)
>> New Revision: 16871
>>
>> Modified:
>> trunk/freenet/src/freenet/node/PeerNode.java
>> Log:
>> comments
>>
>>
>> Modified: trunk/freenet/src/freenet/node/PeerNode.java
>> ===================================================================
>> [...]
>> public boolean isRoutable() {
>> + //FIXME: isConnected() is redundant if 'isRoutable', right? ...
>>
>> currentLocation>1.0 is impossible.
>> return isConnected() && isRoutingCompatible() &&
>> !(currentLocation < 0.0 || currentLocation > 1.0);
>> }
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080104/8757886f/attachment.html>