Clearer param change validation

This commit is contained in:
sqrrm 2018-11-16 20:15:17 +01:00
parent e577d0c4a9
commit 0c855f8dd0
No known key found for this signature in database
GPG Key ID: 45235F9EF87089EC
2 changed files with 9 additions and 1 deletions

View File

@ -150,6 +150,14 @@ public enum Param {
this(defaultValue, paramType, 1, 1);
}
/**
* Whether the BSQ fee and phase is valid for a transaction.
*
* @param defaultValue Value at the start of the DAO
* @param paramType Type of parameter
* @param maxDecrease Decrease of param value limited to current value / maxDecrease
* @param maxIncrease Increase of param value limited to current value * maxIncrease
*/
Param(String defaultValue, ParamType paramType, double maxDecrease, double maxIncrease) {
this.defaultValue = defaultValue;
this.paramType = paramType;

View File

@ -185,6 +185,6 @@ public class ChangeParamValidator extends ProposalValidator {
throw new ValidationException("Input is larger than " + max + " times the current value.");
if (change < (1 / min))
throw new ValidationException("Input is smaller than " + 1 / min + " % of the current value.");
throw new ValidationException("Input is smaller than " + 1 / min + " times the current value.");
}
}