[bisq-network/bisq] Add irregular txType, add check for total balance, prevent proposal withhold attack (#2587)

sqrrm notifications at github.com
Sat Mar 30 21:45:46 UTC 2019


sqrrm commented on this pull request.



> @@ -811,6 +816,27 @@ public long getTotalAmountOfConfiscatedTxOutputs() {
                 .sum();
     }
 
+    public long getBurnedBsqOfAllInvalidTxs() {
+        return getTxStream()
+                .filter(e -> e.getTxType() == TxType.INVALID)
+                .mapToLong(this::getBurnedBsqOfInvalidTx)
+                .sum();
+    }
+
+    public long getBurnedBsqOfInvalidTx(Tx tx) {

Yeah, good point. If we can add the field and set in the parser it would be more correct and safer I think.

-- 
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/2587#discussion_r270643006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190330/29272653/attachment.html>


More information about the bisq-github mailing list