user22802: I had 3 Bitcoins stored on my PC and I had a backup image of my PC. I restored my PC on another computer from the image and I had 3 Bitcoins on that computer also. I spent 5 Bitcoins as a test, and it worked. What just happened?

user22817: This occurrence has it's own name and there are lots of resources about this problematic aspect of bitcoins: https://en.bitcoin.it/wiki/Double-spending
The Bitcoin police is on the way to your house right now.

user22807: When you say you spent 5 BTC as a test, do you mean you sent off transactions worth 5 BTC?  You essentially just tried to double spend and the blockchain is going to reject one of those.

user5757: As another analogy, it is like taking your bank statement, showing a $1000 balance, and making a copy of it, and thinking you now have a total of $2000 in two accounts. You don't; you are counting the same money twice.
If both computers' client software is in sync, then if you spend the coins on one computer, the other computer will also show them as spent. If you send coins from one wallet to the other, the destination wallet will show that you sent coins to yourself, and your balance will not increase.
If each wallet does show a total balance of 3 bitcoins, and they correspond to coins in the same addresses, then there should be no way to spend a total of 5 bitcoins. Indeed, there should be no way to get either client to even show that you have 5 bitcoins. It's not clear exactly what you mean when you say that you spent 5 bitcoins; for us to be sure of what happened, you would need to explain in detail exactly what you did.
If you spend coins from both wallets in quick succession, you may be able to create two different transactions that attempt to spend the same coins.  This is called a double spend. However, only one of those transactions will be confirmed, so you can't actually get goods or services for both transactions, unless the other party is foolish enough not to wait for confirmations.

user18196: It's like two people holding on to the same $20 bill and each of them saying, "see, I have 20 dollars!".
Bitcoins can be spent/accessed by anyone that has the private key to unlock them. If two computers have the same private key stored, then they can both access the bitcoins. If one wallet spends the bitcoins, the other wallet will show them as spent as well, just like one person spending the $20 bill means it is gone for the other person.

22802: <p>I had 3 Bitcoins stored on my PC and I had a backup image of my PC. I restored my PC on another computer from the image and I had 3 Bitcoins on that computer also. I spent 5 Bitcoins as a test, and it worked. What just happened?</p>
 22817: <p>This occurrence has it's own name and there are lots of resources about this problematic aspect of bitcoins: <a href="https://en.bitcoin.it/wiki/Double-spending" rel="nofollow">https://en.bitcoin.it/wiki/Double-spending</a></p>

<p>The Bitcoin police is on the way to your house right now.</p>
 22807: <p>When you say you spent 5 BTC as a test, do you mean you sent off transactions worth 5 BTC?  You essentially just tried to double spend and the blockchain is going to reject one of those.</p>
 5757: <p>As another analogy, it is like taking your bank statement, showing a $1000 balance, and making a copy of it, and thinking you now have a total of $2000 in two accounts. You don't; you are counting the same money twice.</p>

<p>If both computers' client software is in sync, then if you spend the coins on one computer, the other computer will also show them as spent. If you send coins from one wallet to the other, the destination wallet will show that you sent coins to yourself, and your balance will not increase.</p>

<p>If each wallet does show a total balance of 3 bitcoins, and they correspond to coins in the same addresses, then there should be no way to spend a total of 5 bitcoins. Indeed, there should be no way to get either client to even show that you have 5 bitcoins. It's not clear exactly what you mean when you say that you spent 5 bitcoins; for us to be sure of what happened, you would need to explain in detail exactly what you did.</p>

<p>If you spend coins from both wallets in quick succession, you may be able to create two different transactions that attempt to spend the same coins.  This is called a double spend. However, only one of those transactions will be confirmed, so you can't actually get goods or services for both transactions, unless the other party is foolish enough not to wait for confirmations.</p>
 18196: <p>It's like two people holding on to the same $20 bill and each of them saying, "see, I have 20 dollars!".</p>

<p>Bitcoins can be spent/accessed by anyone that has the private key to unlock them. If two computers have the same private key stored, then they can both access the bitcoins. If one wallet spends the bitcoins, the other wallet will show them as spent as well, just like one person spending the $20 bill means it is gone for the other person.</p>
