forked from I2P_Developers/i2p.i2p
Kad unit tests:
- Port KBSTest from i2p.zzz.kademlia branch
- Fix RandomTrimmer so it always returns true, so it may be used
as the trimmer in the unit tests
This commit is contained in:
@@ -26,6 +26,7 @@ public class RandomTrimmer<T extends SimpleDataStructure> implements KBucketTrim
|
||||
if (sz < _max)
|
||||
return true;
|
||||
T toRemove = e.get(_ctx.random().nextInt(sz));
|
||||
return kbucket.remove(toRemove);
|
||||
kbucket.remove(toRemove);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user