How can one calculate message hash [h] of a raw transaction?
I will choose this TESTNET transaction to show you:
https://tbtc.bitaps.com/ff948290ff332aed8f0e5d767118a02e8671578c6775a333bb4ee4d6ccfcf639/mpPQhMr2CuRn1AQJgCmcMhH8PgrYaKknSaClick on the raw transaction option;
You will see this:
0100000001b9c222461de38f9fcdc121a47e27c5a08932232b00adc1e2c3fbfb55041b942201000
0006a4730440220503434f27f0d5dc23c01a5d2b2b2abb902e2816987515dafa619ffded8fc2ec6
02204c30c0b82c9afd623e140bf2d6badfa2f02414ef3ffc603e83f2f65a264ce2b801210355d77
643f9bbccde7a1f05d8fa72c0b6c53075cdc299753242320ef9c6611233ffffffff01905f010000
0000001976a914b95bfe11c932408ae44da26872b3c8cd5d61691a88ac00000000
Remove the code and bytes from the signature and the public key
0100000001b9c222461de38f9fcdc121a47e27c5a08932232b00adc1e2c3fbfb55041b942201000
000
6a4730440220503434f27f0d5dc23c01a5d2b2b2abb902e2816987515dafa619ffded8fc2ec6022 04c30c0b82c9afd623e140bf2d6badfa2f02414ef3ffc603e83f2f65a264ce2b801210355d77643 f9bbccde7a1f05d8fa72c0b6c53075cdc299753242320ef9c6611233 ffffffff01905f0100000000001976a914b95bfe11c932408ae44da26872b3c8cd5d61691a88ac0
0000000
Place the RipeMD-160 614bd7ef80e1105fc86895d339eff49a9c56bdad a few more bytes and opcode
0100000001b9c222461de38f9fcdc121a47e27c5a08932232b00adc1e2c3fbfb55041b942201000
000
1976a914614bd7ef80e1105fc86895d339eff49a9c56bdad88ac ffffffff01905f0100000000001976a914b95bfe11c932408ae44da26872b3c8cd5d61691a88ac0
0000000
01000000Now access this site
https://emn178.github.io/online-tools/sha256.html0100000001b9c222461de38f9fcdc121a47e27c5a08932232b00adc1e2c3fbfb55041b942201000
0001976a914614bd7ef80e1105fc86895d339eff49a9c56bdad88acffffffff01905f0100000000
001976a914b95bfe11c932408ae44da26872b3c8cd5d61691a88ac0000000001000000
Second hash
DONE!
c340c9ece755e54bf99c34386eb8e19befd76cb3ddd5b47a4d52be65fea05b6d