<p><code>671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288</code> is the <code>txid</code> while <code>0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49</code> is the <code>wtxid</code>. wtxid was introduced with segwit. For more info check <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Transaction_ID" rel="nofollow noreferrer">BIP141</a></p>

CC BY-SA 4.0
2018-10-15T17:29:34.047Z
Thanks: with the isWitness = true, I get the right result. From https://bitcointalk.org/index.php?topic=5014781.0
I understand there is a bug and I should add my own test to detect if the tx is segwit.
jfjobidon
CC BY-SA 4.0
2018-10-15T17:31:29.857Z
Curiously: getrawtransaction 671d...930fa6288 1
gives the right transaction
jfjobidon
CC BY-SA 4.0
2018-10-12T23:41:09.830Z
OK, but still: how do I get the right Tx ?
after the decoderawtransaction, I only have one entry in vout, but Tx 671d524548...
has two and I need vout[1] which doesn't exist  !
jfjobidon
CC BY-SA 4.0
2018-10-13T18:11:53.880Z
@jfjobidon for some reason decoderawtransaction fails to understand it is a segwit tx. If you add the optional iswitness parameter to true it should be parsed normally. try `decoderawtransaction <hex> true`
Mike D
CC BY-SA 4.0
2018-10-11T19:51:28.047Z
2018-10-11T19:51:28.047Z
Mike D
<p>I run my own bitcoin core node: MacOS version v0.16.3 (64-bit)</p>

<p>I want to analyse tx: 3170cd6c0d49c1c851d640547b5533b62e40071c376feeb83a0a40bce5195802</p>

<p>The first input (key 2MxcuVyGCgS3eua3GtqNnZ27u78Kb4e2HZi) is a reference to 
tx 671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288</p>

<p>My problem: in Bitcoin core console</p>

<blockquote>
  <p>getrawtransaction
  671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288</p>
</blockquote>

<p>gives</p>

<blockquote>
  <p>020000000001014b2f3d5c0a5b6ee52ffc9055a136259293e5c18d9e6dbee4940a89771cab0f6f00000000171600148b09361ee67671f8dcae817d9cf63e4813a6aedafeffffff02f09f32080000000017a914a232cca07c26b7563c45cb3b376f4cb6c10567ad8740420f000000000017a9143af258d1325b375a690373e70984fd4b31c52a24870248304502210081c915acf6e45b0ec3f5095a67ce08219ac530925343b1f48e860fffc22a7a11022002dedd31f12d91c79f6f8eac1a8740fc95a6f4db072337400ce32f15b3b4698f0121020a971d08e76b5ced32d9c340ea0c37d4ad0322a6e579352b38d4db8d0bda73b928e31500</p>
</blockquote>

<p>decoderawtransaction(020000...31500)</p>

<p>gives</p>

<pre><code>{
"txid": "0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49",   
"hash": "0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49", 
...
}
</code></pre>

<p>which is the wrong tx. I checked on few explorers and they give the right tx.</p>

<p>What's wrong with my bitcoin core ?</p>

CC BY-SA 4.0
2018-10-11T18:52:47.827Z
bitcoin core version?
JBaczuk
CC BY-SA 4.0
2018-10-11T19:05:11.557Z
MacOS version v0.16.3 (64-bit) TESTNET
jfjobidon
<bitcoin-core><bitcoind>
Bitcoin core gives wrong previous Tx
jfjobidon
# Bitcoin core gives wrong previous Tx

(Asked by: username_0 on 2018-10-11)

I run my own bitcoin core node: MacOS version v0.16.3 (64-bit)

I want to analyse tx: 3170cd6c0d49c1c851d640547b5533b62e40071c376feeb83a0a40bce5195802

The first input (key 2MxcuVyGCgS3eua3GtqNnZ27u78Kb4e2HZi) is a reference to
tx 671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288

My problem: in Bitcoin core console

> getrawtransaction
> 671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288

gives

> 020000000001014b2f3d5c0a5b6ee52ffc9055a136259293e5c18d9e6dbee4940a89771cab0f6f00000000171600148b09361ee67671f8dcae817d9cf63e4813a6aedafeffffff02f09f32080000000017a914a232cca07c26b7563c45cb3b376f4cb6c10567ad8740420f000000000017a9143af258d1325b375a690373e70984fd4b31c52a24870248304502210081c915acf6e45b0ec3f5095a67ce08219ac530925343b1f48e860fffc22a7a11022002dedd31f12d91c79f6f8eac1a8740fc95a6f4db072337400ce32f15b3b4698f0121020a971d08e76b5ced32d9c340ea0c37d4ad0322a6e579352b38d4db8d0bda73b928e31500

decoderawtransaction(020000...31500)

gives

```
{
"txid": "0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49",   
"hash": "0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49", 
...
}

```

which is the wrong tx. I checked on few explorers and they give the right tx.

What's wrong with my bitcoin core ?

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: bitcoin core version?  
> **username_0**: MacOS version v0.16.3 (64-bit) TESTNET  

---

## 1 answers

### Answer by username_2 on 2018-10-11. Score: 2 | Accepted answer

`671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288` is the `txid` while `0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49` is the `wtxid`. wtxid was introduced with segwit. For more info check [BIP141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Transaction_ID)

> **Comments:**
> **username_0**: OK, but still: how do I get the right Tx ? after the decoderawtransaction, I only have one entry in vout, but Tx 671d524548... has two and I need vout[1] which doesn't exist  !  
> **username_2**: @username_0 for some reason decoderawtransaction fails to understand it is a segwit tx. If you add the optional iswitness parameter to true it should be parsed normally. try `decoderawtransaction <hex> true`  
> **username_0**: Thanks: with the isWitness = true, I get the right result. From https://bitcointalk.org/index.php?topic=5014781.0 I understand there is a bug and I should add my own test to detect if the tx is segwit.  
> **username_0**: Curiously: getrawtransaction 671d...930fa6288 1 gives the right transaction  

---

