Author: toad
Date: 2008-04-28 17:32:56 +0000 (Mon, 28 Apr 2008)
New Revision: 19600
Modified:
trunk/freenet/src/freenet/node/NodeStats.java
Log:
More accurate to start as long
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2008-04-28 17:32:36 UTC
(rev 19599)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2008-04-28 17:32:56 UTC
(rev 19600)
@@ -585,7 +585,7 @@
successfulSskOfferReplyBytesReceivedAverage.currentValue() * numSSKOfferReplies;
}
double bandwidthAvailableInput =
- (double)node.getInputBandwidthLimit() * 90; // 90
seconds at full power; avoid integer overflow
+ (long)node.getInputBandwidthLimit() * 90; // 90 seconds
at full power; avoid integer overflow
if(bandwidthAvailableInput < 0){
Logger.error(this, "Negative available bandwidth:
"+bandwidthAvailableInput+" node.ibwlimit="+node.getInputBandwidthLimit()+"
node.obwlimit="+node.getOutputBandwidthLimit()+"
node.inputLimitDefault="+node.inputLimitDefault);
}