Been writing a bitcoin library from scratch, which eventually involves calculating transaction IDs.
Version 1 transactions work fine when their hex data is being SHA256'd twice and then reversed.
Version 2 transactions ids don't seem to work that way, according to data I found on block explorers. The IDs I generate never match.
Why?
Transaction hex, and then double-sha256 what you get, then reverse it... matches the ID in the URL. The same doesn't seem to apply for any v2 transaction... no idea why. – RooSoft Nov 13 '22 at 00:49