From a381cb2a4b30a6c8033fd91a40d91ee4a6e71374 Mon Sep 17 00:00:00 2001 From: dmos62 <2715476+dmos62@users.noreply.github.com> Date: Wed, 29 Apr 2020 19:11:12 +0200 Subject: [PATCH] Fix forgotten break in switch statement #2 Without the break statement, the execution would continue through the subsequent case clauses until it encountered a break, executing `checkArgument` calls meant for `REIMBURSEMENT_MAX_AMOUNT`. More specifically, the bug would cause a failed check in the case where `inputValueAsCoin.value <= 200000000` is false. --- .../core/dao/governance/proposal/param/ChangeParamValidator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/bisq/core/dao/governance/proposal/param/ChangeParamValidator.java b/core/src/main/java/bisq/core/dao/governance/proposal/param/ChangeParamValidator.java index 41e4f320f72..87eb9882305 100644 --- a/core/src/main/java/bisq/core/dao/governance/proposal/param/ChangeParamValidator.java +++ b/core/src/main/java/bisq/core/dao/governance/proposal/param/ChangeParamValidator.java @@ -144,6 +144,7 @@ private void validateBsqValue(Coin currentParamValueAsCoin, Coin inputValueAsCoi case REIMBURSEMENT_MIN_AMOUNT: checkArgument(inputValueAsCoin.value >= Restrictions.getMinNonDustOutput().value, Res.get("validation.amountBelowDust", Restrictions.getMinNonDustOutput().value)); + break; case COMPENSATION_REQUEST_MAX_AMOUNT: case REIMBURSEMENT_MAX_AMOUNT: checkArgument(inputValueAsCoin.value >= Restrictions.getMinNonDustOutput().value,