Router: Reduce rekey probability from 10% to 5%

This commit is contained in:
zzz
2015-09-11 13:24:10 +00:00
parent 157d494dee
commit 9d05424202
2 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 8;
public final static long BUILD = 9;
/** for example "-test" */
public final static String EXTRA = "-rc";

View File

@@ -113,8 +113,8 @@ class LoadRouterInfoJob extends JobImpl {
if (sigTypeChanged && getContext().getProperty(CreateRouterInfoJob.PROP_ROUTER_SIGTYPE) == null) {
// Not explicitly configured, and default has changed
// Give a 10% chance of rekeying for each restart
// TODO reduce from 10 to ~3 (i.e. increase probability) in future release
if (getContext().random().nextInt(10) > 0) {
// TODO reduce from 20 to ~3 (i.e. increase probability) in future release
if (getContext().random().nextInt(20) > 0) {
sigTypeChanged = false;
if (_log.shouldWarn())
_log.warn("Deferring RI rekey from " + stype + " to " + cstype);