[bisq-network/bisq] Improve Validation of Deposit Inputs (#5618)

chimp1984 notifications at github.com
Mon Jul 12 11:46:54 CEST 2021


@chimp1984 requested changes on this pull request.

NACK. I think it is wrong. We always have 2 inputs to the deposit tx. If you have a clear case where that is not the case, please post all the trade transactions and describe how you could reproduce it. Thanks. 

> @@ -356,23 +356,46 @@ public static void validatePayoutTxInput(Transaction depositTx,
     }
 
     public static void validateDepositInputs(Trade trade) throws InvalidTxException {
-        // assumption: deposit tx always has 2 inputs, the maker and taker
-        if (trade == null || trade.getDepositTx() == null || trade.getDepositTx().getInputs().size() != 2) {
-            throw new InvalidTxException("Deposit transaction is null or has unexpected input count");
+        /*
+         * deposit tx usually has 2 inputs, the maker and taker

Can you provide more detail when that would be expected? I do not see any case where that can happen.
Funding goes to the fee txs, the deposit tx always has the 1 output from the fee tx. The deposit can have 2 outputs in case the trade amount is < offer amount, as one output would be change to the seller/maker then. 

-- 
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/5618#pullrequestreview-703892380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210712/315c5d1a/attachment.htm>


More information about the bisq-github mailing list