|
Yes. What you think of as a "specific Bitcoin" doesn't actually exist; what exists is an "unspent transaction output", which can be used as an input for a new transaction if certain conditions are met. So what really happens in your example scenario is: 1. Alice knows the private keys corresponding to one or more unspent outputs of transactions, with a total value of 1 BTC; 2. Bob knows the private keys corresponding to one or more unspent outputs of transactions, with a total value of 1 BTC; 3. Both create new transactions, specifying one or more of their formerly unspent outputs as inputs to the new transaction, and Charlie's address (which is a hash of a public key) as one of the outputs of the new transaction, that output having the value of 1 BTC; 4. Charlie creates a new transaction, with David's address as one of the outputs, having the value of 1 BTC. Note that, at this point, Charlie can chose which of the unspent outputs will be used as the input for the new transaction. It can be the output from Alice's transaction, it can be the output from Bob's transaction, it can be the output from some other transaction, or it can even be a combination of them: the transaction could have both Alice's and Bob's outputs as inputs, and have two outputs, one going to David, the other going to a new address (which can be a "change address" on the same wallet, or an address belonging to someone else). |