<p></p>
<p><b>@oscarguindzberg</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4612#discussion_r510195140">core/src/main/java/bisq/core/btc/wallet/TradeWalletService.java</a>:</p>
<pre style='color:#555'>> @@ -1181,6 +1181,11 @@ 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 the connected tx's witness data.
</pre>
<blockquote>
<p>Isn't the input always from the users own wallet (not the peers input)? If so I don't understand the above comment. Then this code is only execute anyway if the user runs the new version and segwit could be used.</p>
</blockquote>
<p>When creating the deposit tx, traders will have a tx with an input from her wallet and an input from the counterparty.  Traders collaborate creating the deposit tx. They send RawTransactionInput over p2p. So, if you are trading with a node that was not upgraded to bitcoinj 0.15 and RawTransactionInput.parentTransaction is serialized with segwit data, the other node won't be able to parse RawTransactionInput.parentTransaction correctly.<br>
Extra comments:</p>
<ul>
<li>RawTransactionInput.parentTransaction could be replaced with RawTransactionInput.parentTransactionHash since the tx is only used to obtain its hash.</li>
<li>Since we upgraded the trade protocol version, it is not possible to take a trade from a not-upgraded node, but better be on the safe side. This comment made probably more sense for the previous release.</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4612#discussion_r510195140">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSCB45HPVKZHTLXYE3SMA4WFANCNFSM4SKTGGBA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQJTSZDDEKXPQQ6RUDSMA4WFA5CNFSM4SKTGGBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOD2XM5DQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4612#discussion_r510195140",
"url": "https://github.com/bisq-network/bisq/pull/4612#discussion_r510195140",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>