create_malleated_version()
function in the functional tests currently creates transactions with same txid, different wtxid but the witness is invalid.- it is useful to have transactions with same txid, different wtxid and valid witness for better coverage and to test how these transactions are relayed over different kinds of P2P connections (ex: see #29415 (review))
Ideally, I would like to extend create_malleated_version()
function so that it can be directly used in private broadcast PR. However for these kind of malleations, I think we need to specially craft a pair of transactions. If anyone has ideas on how to better modularise this so that it can be reused in other tests, I would love to hear them!