[bisq-network/bisq] [WIP] Apply rule to not allow BSQ outputs after BTC output for regular txs (#3413)

chimp1984 notifications at github.com
Sun Oct 20 15:15:25 UTC 2019

chimp1984 commented on this pull request.

> +        if (availableInputValue <= 0) {
+            return false;
+        }
+        // Burned BSQ output is last output before opReturn.
+        // We could have also a BSQ change output as last output before opReturn but that will
+        // be detected at blindVoteFee check.
+        // We always have the BSQ change before the burned BSQ output if both are present.
+        checkArgument(optionalOpReturnIndex.isPresent());
+        if (tempTxOutput.getIndex() != optionalOpReturnIndex.get() - 1) {
+            return false;
+        }
+        // Without checking the fee we would not be able to distinguish between 2 structurally same transactions, one
+        // where the output is burned BSQ and one where it is a BSQ change output.
+        long blindVoteFee = daoStateService.getParamValueAsCoin(Param.BLIND_VOTE_FEE, tempTxOutput.getBlockHeight()).value;

Without knowing the fee you cannot distinguish between a BSQ change and burned BSQ

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191020/a71c9374/attachment.html>

More information about the bisq-github mailing list