Author: toad
Date: 2008-08-29 21:29:28 +0000 (Fri, 29 Aug 2008)
New Revision: 22220

Modified:
   branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
Log:
Calculate k correctly for per-segment filters.


Modified: branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java        
2008-08-29 21:27:32 UTC (rev 22219)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java        
2008-08-29 21:29:28 UTC (rev 22220)
@@ -235,7 +235,7 @@
                if((perSegmentSize & 7) != 0)
                        perSegmentSize += (8 - (perSegmentSize & 7));
                perSegmentBloomFilterSizeBytes = perSegmentSize / 8;
-               perSegmentK = BloomFilter.optimialK(perSegmentSize, 
blocksPerSegment + checkBlocksPerSegment);
+               perSegmentK = BloomFilter.optimialK(perSegmentSize, segBlocks);
                keyCount = origSize;
                // Now create it.
                if(Logger.shouldLog(Logger.MINOR, this))


Reply via email to