Bitcoin Forum
June 19, 2019, 11:16:40 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Parsing your transactions using bitcointools  (Read 8316 times)
Brre
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
July 22, 2010, 03:11:23 PM
 #1

Hi,

I am trying to parse the transactions using bitcointools:

I get the following when i parse the wallet:

'TxIn: prev(82df...6428:1), is this the previous transaction? So how do you compute the net transaction value then, do you have to go back the whole chain?
1560986200
Hero Member
*
Offline Offline

Posts: 1560986200

View Profile Personal Message (Offline)

Ignore
1560986200
Reply with quote  #2

1560986200
Report to moderator
1560986200
Hero Member
*
Offline Offline

Posts: 1560986200

View Profile Personal Message (Offline)

Ignore
1560986200
Reply with quote  #2

1560986200
Report to moderator
Try The Brand New Ethereum Game
50 Last Players Also Win The Bank
Works On Any iOS/Android Device With Standard Browser
Join Us On Telegram To Get Notified When You Can Win
COLOR PIXELS
AND WIN
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1560986200
Hero Member
*
Offline Offline

Posts: 1560986200

View Profile Personal Message (Offline)

Ignore
1560986200
Reply with quote  #2

1560986200
Report to moderator
1560986200
Hero Member
*
Offline Offline

Posts: 1560986200

View Profile Personal Message (Offline)

Ignore
1560986200
Reply with quote  #2

1560986200
Report to moderator
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652
Merit: 1019


Chief Scientist


View Profile WWW
July 23, 2010, 02:25:44 AM
 #2

TxIn: prev(82df...6428:1) means the second TxOut of transaction 82df...something...6428  (it abbreviates the full 256-bit transaction hash and starts counting at zero).

To see that transaction:
Code:
gavin$ dbdump.py --transaction=82df...6428
1 tx in, 2 out
['TxIn: prev(bfb0...cd16:1) pubkey: 17muZqKMEFqzefsqYhR9vqBjz1jNVcDcbh sig: 71:3044...0201 65:0480...af42']
['TxOut: value: 0.05 pubkey: 1GVgigFDZ9pPLyYwxboEoaSDMDbsBQPVMx Script: DUP HASH160 20:a9f6...9268 EQUALVERIFY CHECKSIG', 'TxOut: value: 66.07 pubkey: 1LsvDRhoMmH5YeZDAxaP5rqwNTp3xFCF3Q Script: DUP HASH160 20:da0b...a345 EQUALVERIFY CHECKSIG']
This looks like bitnickels coins coming out of the Bitcoin Faucet.  The transaction before THAT is:
Code:
gavin$ dbdump.py --transaction=bfb0...cd16
1 tx in, 2 out
['TxIn: prev(b1dd...5cd9:1) pubkey: 1MQNsNwRHTu7MWPgFRGRRZfo58jU3RGxJv sig: 73:3046...8501 65:041b...6624']
['TxOut: value: 0.05 pubkey: 1GVgigFDZ9pPLyYwxboEoaSDMDbsBQPVMx Script: DUP HASH160 20:a9f6...9268 EQUALVERIFY CHECKSIG', 'TxOut: value: 66.12 pubkey: 17muZqKMEFqzefsqYhR9vqBjz1jNVcDcbh Script: DUP HASH160 20:4a4e...e0c3 EQUALVERIFY CHECKSIG']

To compute the net transaction value, just add up the values of all the TxOuts; they have to equal the sum of all the TxIns (well, unless there are transaction fees).  So for that first transaction, 66.07+0.05 = 66.12 (which is, indeed, bfb0...cd16:1)

How often do you get the chance to work on a potentially world-changing project?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!