mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Clearer param change validation
This commit is contained in:
parent
e577d0c4a9
commit
0c855f8dd0
@ -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;
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user