Skip to content

Commit

Permalink
Fix forgotten break in switch statement #2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dmos62 committed May 10, 2020
1 parent 58db561 commit a381cb2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a381cb2

Please sign in to comment.