[bisq-network/bisq] Add proof of burn feature (#1912)

sqrrm notifications at github.com
Mon Nov 12 14:05:29 UTC 2018


sqrrm approved this pull request.

utACK

> +    public void onParseTxsComplete(Block block) {
+        updateList();
+    }
+
+    @Override
+    public void onParseBlockChainComplete() {
+    }
+
+
+    ///////////////////////////////////////////////////////////////////////////////////////////
+    // API
+    ///////////////////////////////////////////////////////////////////////////////////////////
+
+    public Transaction burn(String preImageAsString, long amount) throws InsufficientMoneyException, TxException {
+        try {
+            // We create a prepared Bsq Tx for the listing fee.

```suggestion
            // We create a prepared Bsq Tx for the burn amount
```

> +
+    @Override
+    public void onParseTxsComplete(Block block) {
+        updateList();
+    }
+
+    @Override
+    public void onParseBlockChainComplete() {
+    }
+
+
+    ///////////////////////////////////////////////////////////////////////////////////////////
+    // API
+    ///////////////////////////////////////////////////////////////////////////////////////////
+
+    public Transaction burn(String preImageAsString, long amount) throws InsufficientMoneyException, TxException {

Would be nice if this could reuse the code from AssetService.payFee()

> @@ -115,6 +115,8 @@ void processTxOutput(TempTxOutput tempTxOutput) {
                 // The LOCKUP BSQ is burnt unless the output exactly matches the input, that would cause the
                 // output to not be BSQ output at all
                 handleUnlockBondTx(tempTxOutput);
+            } else if (isBurnFeeTxOutput(tempTxOutput)) {

I found this a bit confusing. Seems correct but might help with extra comment or moving this into the next else if, eg.
`else if (!isBurnFeeTxOutput(tempTxOutput) && availableInputValue > 0 && availableInputValue >= txOutputValue) {`

Maybe change function name to `isBurnFeeBtcTxOutput`

-- 
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/1912#pullrequestreview-173898901
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181112/f005b38d/attachment.html>


More information about the bisq-github mailing list