Bitcoin Forum
July 08, 2024, 09:55:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transaction Hash Calculation problem (starting @2nd transaction in the block)  (Read 664 times)
Gabrics (OP)
Full Member
***
Offline Offline

Activity: 183
Merit: 112

Just digging around


View Profile WWW
May 05, 2013, 11:10:41 AM
 #1

Hi,

I am trying to calculate the correct hashes of BTC transactions.

I used this as a guide (couldn't find anything deeper Sad):
http://bitcoin.stackexchange.com/questions/2859/how-are-transaction-hashes-calculated

Works ok, as the page says, but only for the first transaction in each block.
All the rest of the transaction hash-es are "no good".
I wonder what should I do differently? Should I carry over something from the 1th hash to the 2nd and so on??

Any help would be appreciated.

Thanks
Gabor
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
May 05, 2013, 11:16:50 AM
 #2

Check endianness carefully. I had similar problem.
Gabrics (OP)
Full Member
***
Offline Offline

Activity: 183
Merit: 112

Just digging around


View Profile WWW
May 06, 2013, 11:28:12 AM
 #3

Thank you.
Could I be wrong at the first transaction at each block, and the same hash calculation fails at all the rest of the transactions?
I can only see that coinbase transactions have very short scriptSigLen. But I have the correct len as all of the transactions have the correct values.

Will try to play with that value a bit more, if I find the solution I will post it here. Any more ideas are welcome Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!