<p>Inside transaction inputs, you have to refer to previous transactions using the txid. Allowing a wtxid there would be (1) a hard fork and (2) defeating the purpose, as it'd make transactions malleable again.</p>

<p>The wtxid is <em>only</em> used to compute the Witness merkle root, which is committed to in the coinbase.</p>

CC BY-SA 3.0
2017-07-06T19:51:44.857Z
2017-07-06T19:51:44.857Z
Pieter Wuille
<p>With segwit there will be two transaction ids <code>wtxid</code> and <code>txid</code><br>
Can either one of them be used as previous hash or only txid?</p>

<segregated-witness><transaction-id><transaction-input>
SegWit and previous hash: txid or wtxid, or either?
Albert S
# SegWit and previous hash: txid or wtxid, or either?

(Asked by: username_0 on 2017-07-06)

With segwit there will be two transaction ids `wtxid` and `txid`  
Can either one of them be used as previous hash or only txid?

**Tags:** segregated-witness, transaction-id, transaction-input


---

## 1 answers

### Answer by username_1 on 2017-07-06. Score: 6

Inside transaction inputs, you have to refer to previous transactions using the txid. Allowing a wtxid there would be (1) a hard fork and (2) defeating the purpose, as it'd make transactions malleable again.

The wtxid is *only* used to compute the Witness merkle root, which is committed to in the coinbase.


---

