slow down the ff volunteers

This commit is contained in:
zzz
2009-05-02 03:38:01 +00:00
parent a8a0e2a91c
commit 40637e0f28

View File

@ -46,7 +46,12 @@ class FloodfillMonitorJob extends JobImpl {
getContext().router().rebuildRouterInfo();
if (_log.shouldLog(Log.INFO))
_log.info("Should we be floodfill? " + ff);
requeue((REQUEUE_DELAY / 2) + getContext().random().nextInt(REQUEUE_DELAY));
int delay = (REQUEUE_DELAY / 2) + getContext().random().nextInt(REQUEUE_DELAY);
// there's a lot of eligible non-floodfills, keep them from all jumping in at once
// To do: somehow assess the size of the network to make this adaptive?
if (!ff)
delay *= 3;
requeue(delay);
}
private boolean shouldBeFloodfill() {