Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Mitzplik on May 30, 2016, 02:36:48 AM



Title: Understanding a transaction
Post by: Mitzplik on May 30, 2016, 02:36:48 AM
Hi everyone, Im testing some functionalities, and I would like to understand what happened in this testnet transaction:
https://tbtc.blockr.io/tx/info/a4172e747120b2336398b1e3661ea0b81f634d67c9e3daa95215ec4a9cf4ca80

Theoretically, mknda3aU9LH4BAL2eqeegQRnShhQawoUWo sent 1.5 BTC to mnuR8XwU7jg6ryCtJ4dJXZu6wXjiaiguLz, but it seems that it used mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu unspent transactions. Why did this happen?


Title: Re: Understanding a transaction
Post by: steven0021 on May 30, 2016, 02:42:30 AM
mknda3aU9LH4BAL2eqeegQRnShhQawoUWo doesn't even have 1.5tbtc. How would you send something you don't have?


Title: Re: Understanding a transaction
Post by: franky1 on May 30, 2016, 02:47:29 AM
OP you got it the wrong way round

mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu had the 1.5 which was originally from 2 transactions.. one for 1btc one for 0.5btc

it sent out the total of 1.5btc as 1.3btc into mnuR8XwU7jg6ryCtJ4dJXZu6wXjiaiguLz
it calculated a fee of: 0.00011180btc
and then put the 'change' of: 0.1998882btc into mknda3aU9LH4BAL2eqeegQRnShhQawoUWo


Title: Re: Understanding a transaction
Post by: Mitzplik on May 30, 2016, 02:48:02 AM
Sorry, your right, mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu sent, but why the remaining balance went to mknda3aU9LH4BAL2eqeegQRnShhQawoUWo instead of going back to mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu ?


Title: Re: Understanding a transaction
Post by: steven0021 on May 30, 2016, 02:50:21 AM
Sorry, your right, mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu sent, but why the remaining balance went to mknda3aU9LH4BAL2eqeegQRnShhQawoUWo instead of going back to mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu ?

It's the change address (https://en.bitcoin.it/wiki/Change). Bitcoin-qt will automatically assign a change address for every transactions that have changes unless you turn off the feature


Title: Re: Understanding a transaction
Post by: franky1 on May 30, 2016, 02:51:11 AM
Sorry, your right, mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu sent, but why the remaining balance went to mknda3aU9LH4BAL2eqeegQRnShhQawoUWo instead of going back to mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu ?

most client software creates a fresh 'change' address and adds it to your wallet when you make the transaction. and then ensures the change goes to that address..

only a few client software can be programmed to automate that funds go back to the original source. but many of the bitcoin-dev's dont recommend it for many reasons


Title: Re: Understanding a transaction
Post by: Mitzplik on May 30, 2016, 02:54:49 AM
Thank you all.


Title: Re: Understanding a transaction
Post by: Edwardard on May 30, 2016, 04:01:12 AM
Sorry, your right, mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu sent, but why the remaining balance went to mknda3aU9LH4BAL2eqeegQRnShhQawoUWo instead of going back to mhdpHdGbkoTXCfkZZQhJUgQrFiTytwB5gu ?
you have to learn how hd wallets work. mycelium hd wallet gives a new address after every transaction. it is same in your case with bitoin qt.