I understand the invoice example. Bitcoin addresses are not account numbers. Bitcoin addresses are more like invoice numbers. Ok.
Great. Glad to hear it.
- snip -
If that's what you are asking:
Which of the payments previously received will be spent?
Then the answer is:
It depends on your wallet. The wallet gets to choose which of the unspent transaction outputs to spend. The creator of the wallet implements an algorithm for making that decision. Some wallets also provide advanced features commonly called "coin control" which allow the user to specify which unspent transaction outputs they want to spend.
Yes, that's what
I really want to learn. "Which of the payments previously received will be spent?"I'm not sure why you care. Like I said, in most cases it isn't a very meaningful question. However, I think I just answered that question, didn't I?
It depends on your wallet.
I transferred BTC from my wallet to D. The wallet decided according to its own algorithm. Bitcoin transfer to address D has been performed.
Now, when I check address D at blockchain.info, which one will appear as the transfer address? A, B, C ?
That depends on how much you transfer and which wallet you are using. The wallet gets to decide.
It might be A.
It might be B.
It might be C.
It might be A and B.
It might be A and C.
It might be B and C.
It might be A, B, and C.
Also would I have a problem if I wanted to transfer 0.8 BTC? I have a total of 1 BTC in my wallet. But none of the addresses in the wallet have 0.8 BTC. What would happen in such a situation?
The wallet would choose multiple payments to spend. It would choose enough payments so that the sum is at least 0.8 BTC (plus any transaction fee you might want to pay).
So, given the A, B, and C that you mentioned earlier...
It might be A and C (for a total of 0.8 BTC)
It might be B and C (for a total of 0.9 BTC)
It might be A, B, and C (for a total of 1.0 BTC)
If the amount chosen is more than the sum of the amount you are sending plus the transaction fee, then the transaction will have two outputs (one for the intended payment, and another to send the extra back to your wallet).