Bitcoin Forum
November 13, 2024, 01:17:20 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transaction Hash Calculation problem (starting @2nd transaction in the block)  (Read 681 times)
Gabrics (OP)
Full Member
***
Offline Offline

Activity: 193
Merit: 121

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: 1010

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: 193
Merit: 121

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!