0
I am able to get the tx id (or transaction hash) of almost any transaction but the one where the script starts with an "OP_O" (which is, I think, the null dummy introduced here https://github.com/bitcoin/bitcoin/pull/3843)
For example:
https://www.blockchain.com/btc/tx/97d1b00fcef1f19531a19bb1722635341a9f2ad261ecf6eed89eca2cbd3bb3ee
How am I suppose to get the txid of this transaction? And how is it different from a regular (without multisig) one?
Thank you, I will double-check my code. I tested it on a full block (about 2k txs) and the only times the txid didn't match (20 times) was when a "OP_0" appeared in one of the inputs scripts. – Kevin P – 2018-10-24T18:07:56.720
Also, I don't simply hash the transaction as it is. I parse it, store all its elements in a data structure, and then append them back and hash them (I use the tx id as an error check). – Kevin P – 2018-10-24T18:11:38.997
OP_0 is used in segwit transactions too, so that may be your problem. – Andrew Chow – 2018-10-24T19:30:50.093
Problem solved: I had a problem with my "varint" function... Thank you! – Kevin P – 2018-10-25T06:29:05.760