Bitcoin Forum
December 11, 2024, 10:48:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help with custom transaction validation code  (Read 574 times)
funkdaddy (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 19, 2013, 01:08:45 PM
 #1

I am writing some code that will take new transactions from the p2p network and do a basic 0 confirmation validation on them.

I am testing this with the blockchain api.

If I see a new transaction, for example: http://blockchain.info/rawtx/af6b257b03aada61f0d1c05490166df5e730408ec59627c68914cc66f5eeb63d

I want to walk the inputs. Take the first input returned from the above url : {"prev_out":{"n":1,"value":899999,"addr":"1HVpyjYEPwQhvRQ3dL8tGe9kiydti616sX","tx_index":54344920,"type":0}}

What is tx_index in this case? Where is this generated from?


If I look up this tx index in blockchain: https://blockchain.info/rawtx/54344920

Is the correct procedure to verify that the address 1HVpyjYEPwQhvRQ3dL8tGe9kiydti616sX did in fact receive the correct value more or equal to 899999 satoshi?


Am I missing anything else very important in this checking

Thank you in advance.
funkdaddy (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 19, 2013, 10:40:39 PM
 #2

Does anyone have answer to the tx_index? Where is tx_index come from and what does it do?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4894



View Profile
February 19, 2013, 11:38:15 PM
 #3

I always assumed that tx_index is the row index that blockchain.info assigns the transaction in their own database when they load the information in from the blockchain.  I'm not aware of a tx_index in the actual blockchain itself.
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!