[bisq-network/bisq] [WIP] Segwit for the trade protocol (#4612)

chimp1984 notifications at github.com
Thu Oct 22 15:44:33 UTC 2020


@chimp1984 commented on this pull request.



> @@ -1183,11 +1183,8 @@ private RawTransactionInput getRawInputFromTransactionInput(@NotNull Transaction
                 "input.getConnectedOutput().getParentTransaction() must not be null");
         checkNotNull(input.getValue(), "input.getValue() must not be null");
 
-        // If we would be sure all bisq nodes migrated to bitcoinj 0.15, bitcoinSerialize(true) can be used.
-        // Since there is no way to check migration to bitcoinj 0.15,
-        // Config.SEGWIT_TRADE_PROTOCOL_ACTIVE could be checked instead.
-        // Actually, given the serialized tx is used just as the connected tx of an input,
-        // we don't need the connected tx's witness data.
+        // bitcoinSerialize(false) is used just in case the serialized tx is parsed by a bisq node still using
+        // bitcoinj 0.14. The serialized tx is just used to obtain its hash, so the witness data is not relevant.
         return new RawTransactionInput(input.getOutpoint().getIndex(),

getRawInputFromTransactionInput is used only by methods for creating the deposit tx. With the trade protocol update we do not have mixed cases of segwit/legacy here. Or do I miss something? 

> @@ -1193,10 +1196,6 @@ private RawTransactionInput getRawInputFromTransactionInput(@NotNull Transaction
 
     private byte[] getMakersScriptSigProgram(TransactionInput transactionInput) throws TransactionVerificationException {
         byte[] scriptProgram = transactionInput.getScriptSig().getProgram();
-        if (scriptProgram.length == 0) {
-            throw new TransactionVerificationException("Inputs from maker not signed.");
-        }
-
         return scriptProgram;

I saw you removed the method. Good so...

-- 
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/4612#pullrequestreview-514868352
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201022/1a666e3a/attachment.html>


More information about the bisq-github mailing list