2

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 ?

2
  • bitcoin core version?
    – JBaczuk
    Oct 11 '18 at 18:52
  • MacOS version v0.16.3 (64-bit) TESTNET
    – jfjobidon
    Oct 11 '18 at 19:05
2

671d52454812a73517aac8b8d0aeff82a81dc1a493f84fdcfa6273e930fa6288 is the txid while 0c47b3981a84eed8032fe87f7909da1c95fb35adcb8ba533c24712589487ca49 is the wtxid. wtxid was introduced with segwit. For more info check BIP141

4
  • 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
    Oct 12 '18 at 23:41
  • @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
    Oct 13 '18 at 18:11
  • Thanks: with the isWitness = true, I get the right result. From 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
    Oct 15 '18 at 17:29
  • Curiously: getrawtransaction 671d...930fa6288 1 gives the right transaction
    – jfjobidon
    Oct 15 '18 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.