<p>the Blockchain contains all necessary info to know the balance of every address, including "it's own". When it downloads the next block, it updates all known balances by adjusting them based on every transaction in the block. This repeats.</p>

CC BY-SA 3.0
2014-01-21T08:15:50.330Z
Are you saying the Bitcoin-qt keeps a database of all addresses every used in the blockchain?
John T
CC BY-SA 3.0
2014-01-21T11:29:24.180Z
Yes - that's why it takes so long to start up the first time. It is downloading all transactions ever (the blockchain). In this way it can operate on it's own (that's what decentralised means) and check it's own copy to know "the balance" (which for the record is the total of the unspent outputs at a particular address). It can do that for all addresses not just its own addresses
T9b
CC BY-SA 3.0
2014-01-21T03:49:42.267Z
2014-01-21T03:49:42.267Z
hedgedandlevered
<p>How does Bitcoin-qt technically check for receives to it's own addresses. I know it has a list of addresses loaded in from the wallet.dat, but when a new block or new transaction arrives, what logic increments the wallet balance you see and how? I've been told that it uses some merkle tree stuff.</p>

<transactions><bitcoin-core><receiving>
Where/How does Bitcoin-qt check for receives to it's addresses?
John T
# Where/How does Bitcoin-qt check for receives to it's addresses?

(Asked by: username_0 on 2014-01-20)

How does Bitcoin-qt technically check for receives to it's own addresses. I know it has a list of addresses loaded in from the wallet.dat, but when a new block or new transaction arrives, what logic increments the wallet balance you see and how? I've been told that it uses some merkle tree stuff.

**Tags:** transactions, bitcoin-core, receiving


---

## 1 answers

### Answer by username_1 on 2014-01-21. Score: 1

the Blockchain contains all necessary info to know the balance of every address, including "it's own". When it downloads the next block, it updates all known balances by adjusting them based on every transaction in the block. This repeats.

> **Comments:**
> **username_0**: Are you saying the Bitcoin-qt keeps a database of all addresses every used in the blockchain?  
> **username_2**: Yes - that's why it takes so long to start up the first time. It is downloading all transactions ever (the blockchain). In this way it can operate on it's own (that's what decentralised means) and check it's own copy to know "the balance" (which for the record is the total of the unspent outputs at a particular address). It can do that for all addresses not just its own addresses  

---

