Fix missing segwit case when sanitising preparedDepositTx

Make sure witness data is stripped from the seller's prepared deposit
tx, in addition to ScriptSig data, to prevent the buyer from being able
to publish it prematurely (before having signed the delayed payout tx).
This commit is contained in:
Steven Barclay 2020-11-12 19:02:09 +00:00
parent 77aab8a97c
commit 79fa219533
No known key found for this signature in database
GPG Key ID: 9FED6BF1176D500B

View File

@ -44,6 +44,7 @@ public class SellerAsMakerSendsInputsForDepositTxResponse extends MakerSendsInpu
processModel.getTradeManager().requestPersistence();
return preparedDepositTx.bitcoinSerialize();
// Make sure witnesses are removed as well before sending, to cover the segwit case.
return preparedDepositTx.bitcoinSerialize(false);
}
}