<p>Transaction processing is a function of mining.  Each time a block is found observed transactions become included in the block chain and get one confirmation.  The Bitcoin protocol is designed to have an adjusting difficulty to ensure that blocks are not generated at a speed greater than that>   This ensures the gradual distribution of new coins into the economy as well.  So long story short this is the model that Bitcoin uses and it is one of the few shortcomings of performing transactions.</p>

CC BY-SA 3.0
2013-12-15T10:20:06.613Z
That's fine. But what happens if I send transaction, which are moving 1 BTC from address1 to address2 (address1 has only 0.5 BTC)? Miners will check it? What if I am a miner, and include this transaction in my own block?
Zergatul
CC BY-SA 3.0
2013-12-15T15:01:51.237Z
The bitcoin nodes check all of the transactions in a block and will reject the block if it contains an invalid transaction.  Each transaction must reference an unspent output in order to transfer coins.  If your wallet has just 0.5 BTC, then it does not have an unspent output of 1.0 BTC and the transaction cannot be created.  Note that all transactions are public and are contained in the blockchain, not in your wallet.
ScripterRon
CC BY-SA 3.0
2013-12-15T15:28:02.347Z
So, bitcoin-qt/bitcoind has ability to quicky check unspent output on particular address? Does they contain index with all addresses and unspent output on them?
Zergatul
CC BY-SA 3.0
2013-12-15T06:03:28.293Z
2013-12-15T06:03:28.293Z
Mark S.
<p>As transactions occur, the client tracks their effects on its own balances. If you add a new account, it will have to scan all unspent outputs to find any for that account.</p>

CC BY-SA 3.0
2013-12-15T08:31:55.370Z
2013-12-15T08:31:55.370Z
David Schwartz
<p>How does transaction confirmation work in bitcoin-qt? I suppose, client does not have addresses index with balance on each of them (because there is not such console/bitcoind commands). Looking through all of the blocks - it is too slow.</p>

<transactions><confirmations>
Transaction confirmation
Zergatul
# Transaction confirmation

(Asked by: username_0 on 2013-12-15)

How does transaction confirmation work in bitcoin-qt? I suppose, client does not have addresses index with balance on each of them (because there is not such console/bitcoind commands). Looking through all of the blocks - it is too slow.

**Tags:** transactions, confirmations


---

## 2 answers

### Answer by username_1 on 2013-12-15. Score: 1

Transaction processing is a function of mining. Each time a block is found observed transactions become included in the block chain and get one confirmation. The Bitcoin protocol is designed to have an adjusting difficulty to ensure that blocks are not generated at a speed greater than that> This ensures the gradual distribution of new coins into the economy as well. So long story short this is the model that Bitcoin uses and it is one of the few shortcomings of performing transactions.

> **Comments:**
> **username_0**: That's fine. But what happens if I send transaction, which are moving 1 BTC from address1 to address2 (address1 has only 0.5 BTC)? Miners will check it? What if I am a miner, and include this transaction in my own block?  
> **username_2**: The bitcoin nodes check all of the transactions in a block and will reject the block if it contains an invalid transaction.  Each transaction must reference an unspent output in order to transfer coins.  If your wallet has just 0.5 BTC, then it does not have an unspent output of 1.0 BTC and the transaction cannot be created.  Note that all transactions are public and are contained in the blockchain, not in your wallet.  
> **username_0**: So, bitcoin-qt/bitcoind has ability to quicky check unspent output on particular address? Does they contain index with all addresses and unspent output on them?  

---

### Answer by username_3 on 2013-12-15. Score: 0

As transactions occur, the client tracks their effects on its own balances. If you add a new account, it will have to scan all unspent outputs to find any for that account.


---

