Bitcoin Forum
November 08, 2024, 06:06:22 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sent btc to one address but two appear at blockchain.info  (Read 1627 times)
fresca (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10



View Profile
February 02, 2013, 04:50:46 AM
 #1

I sent an amount to one address for x btc.  My wallet shows the transaction unconfirmed.  block chain.info shows the transaction confirmed with a second address listed for an additional amount.  how can this happen?  in addition my btc wallet crashed/closed right after I sent the transaction.  there are no other transactions to this new address that is coupled with the intended address.  any ideas what might have happened?
Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
February 02, 2013, 05:06:20 AM
 #2

I sent an amount to one address for x btc.  My wallet shows the transaction unconfirmed.  block chain.info shows the transaction confirmed with a second address listed for an additional amount.  how can this happen?  in addition my btc wallet crashed/closed right after I sent the transaction.  there are no other transactions to this new address that is coupled with the intended address.  any ideas what might have happened?
Assuming both sending addresses are yours:
Maybe you sent all the available funds from the address, and the program tried to send a fee.
It found no more funds at the original address and so used another address (which would be a bug).
Later on some code that is working on the assumption that only one address has funds changed finds that 2 addresses have changed funds and this leads to a crash.

What client were you using?
DannyHamilton
Legendary
*
Online Online

Activity: 3486
Merit: 4827



View Profile
February 02, 2013, 05:12:24 AM
 #3

I sent an amount to one address for x btc.  My wallet shows the transaction unconfirmed.  block chain.info shows the transaction confirmed with a second address listed for an additional amount.  how can this happen? . . .

With the way bitcoin works, you can't partially spend a previous output that you received.  It has to be completely spent.  So, if you receive 10 BTC all in a single transaction from someone/somewhere at an address, then that address now has a single 10 BTC output.

Later if you want to send 2 BTC to somebody, the program can use the previous 10 BTC output as an input into the transaction, and create a 2 BTC output to the address where you want to send it.  This leaves 8 BTC leftover in the transaction.  If you don't send those 8 BTC somewhere, then they become miner fees and end up in the coinbase transaction of the new block for the miner to keep.  If you don't want to give those 8 BTC away as fees to the miner, then you need to include a second output in your transaction sending the 8 BTC back to your own wallet.  As an analogy, think of pulling a $10 bill out of your pocket to pay for something that costs $2, you get $8 back in "change".

The way Bitcoin-Qt does this is to create a new bitcoin address that it doesn't tell you about and keep track of that address and the associated private key in your wallet.dat.  Since this isn't an address that you requested in the "Receive Coins" tab of the user interface, it doesn't show up in that list.  Bitcoin-Qt knows about the address since it is in the wallet.dat file, so it includes it in the balance that it shows you.  Bitcoin-Qt uses a new change address for every transaction.  So if you create 10 different transactions, each sending bitcoins somewhere, then your wallet will have used 10 different change addresses (although some of them may be empty if Bitcoin-Qt used the bitcoins associated with some of those address as inputs into other transactions).

. . . in addition my btc wallet crashed/closed right after I sent the transaction.  there are no other transactions to this new address that is coupled with the intended address.  any ideas what might have happened?
Not sure why your wallet crashed, but the crash probably caused your wallet to fall out of sync with the blockchain.  This is probably why your wallet isn't showing confirmations even though blockchain.info show it confirmed.
fresca (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10



View Profile
February 02, 2013, 05:16:59 AM
 #4

got it.  that makes a lot of sense.  The syncro was taking so long that I deleted the blockchain and am reloading it.  I'm expecting once I'm synched to have all my transactions confirmed.

thanks.
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!