[bisq-network/bisq] Bugfix and typofix (#4212)
Manfred Karrer
notifications at github.com
Tue May 5 16:46:29 UTC 2020
@ManfredKarrer commented on this pull request.
NACK
> @@ -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;
I think the correct version would be:
```
case REIMBURSEMENT_MIN_AMOUNT:
case COMPENSATION_REQUEST_MAX_AMOUNT:
case REIMBURSEMENT_MAX_AMOUNT:
checkArgument(inputValueAsCoin.value >= Restrictions.getMinNonDustOutput().value,
Res.get("validation.amountBelowDust", Restrictions.getMinNonDustOutput().value));
checkArgument(inputValueAsCoin.value <= 200000000,
Res.get("validation.inputTooLarge", "200 000 BSQ"));
break;
```
Also MinAmount must not exceed the 200 000 BSQ.
> @@ -285,14 +285,15 @@ private boolean isBtcOutputOfBurnFeeTx(TempTxOutput tempTxOutput) {
// We always have the BSQ change before the burned BSQ output if both are present.
checkArgument(optionalOpReturnIndex.isPresent());
if (index != optionalOpReturnIndex.get() - 1) {
- return false;
+ break;
I don't see any problem with that change but as it is a pure "cosmetic" change I prefer to not touch the code. Some could argue the early return is more readable. I don't have a strong opinion and the break is more consistent but the evaluating benefit / risk just does not justify the change IMO even it seems a trivial and very low risk change.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4212#pullrequestreview-405965168
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200505/b4b0913a/attachment-0001.html>
More information about the bisq-github
mailing list