<p>That is correct. This is what the optional <code>-rescan</code> flag does to the addresses in your wallet when launching bitcoind. </p>

<p>There is no balance property. Balances are just the total values added up on all unspent outputs for a given address, and the only way to determine the unspent outputs of an address is by scanning/tracing/following each output from address to address. </p>

CC BY-SA 3.0
2017-04-18T04:53:35.203Z
So, I assume when I make a transfer, it does not normally rescan the whole blockchain, but keeps a running balance for the addresses in the wallet, but if I add a new address to the wallet, then a rescan will be necessary. Is that right?
Harry Pillsbury
CC BY-SA 3.0
2017-04-18T06:41:08.073Z
Yes, but only when you add a new address *which may have been used before*. When the wallet itself creates a new address for you it knows it has never been used, so no need for a rescan.
Pieter Wuille
CC BY-SA 3.0
2017-04-18T01:07:56.637Z
2017-04-18T01:07:56.637Z
m1xolyd1an
<p>My understanding of how the blockchain works is that to determine the balance of an address one must find all the transactions that have outputs to that address. So, the only way to be sure you are not missing a transaction is that you have to scan the whole blockchain to determine the balance of an address.</p>

<p>Is that correct?</p>

<blockchain><address><balance>
Do I need to scan the whole blockchain to determine a balance?
Harry Pillsbury
# Do I need to scan the whole blockchain to determine a balance?

(Asked by: username_0 on 2017-04-17)

My understanding of how the blockchain works is that to determine the balance of an address one must find all the transactions that have outputs to that address. So, the only way to be sure you are not missing a transaction is that you have to scan the whole blockchain to determine the balance of an address.

Is that correct?

**Tags:** blockchain, address, balance


---

## 1 answers

### Answer by username_1 on 2017-04-18. Score: 2

That is correct. This is what the optional `-rescan` flag does to the addresses in your wallet when launching bitcoind.

There is no balance property. Balances are just the total values added up on all unspent outputs for a given address, and the only way to determine the unspent outputs of an address is by scanning/tracing/following each output from address to address.

> **Comments:**
> **username_0**: So, I assume when I make a transfer, it does not normally rescan the whole blockchain, but keeps a running balance for the addresses in the wallet, but if I add a new address to the wallet, then a rescan will be necessary. Is that right?  
> **username_2**: Yes, but only when you add a new address *which may have been used before*. When the wallet itself creates a new address for you it knows it has never been used, so no need for a rescan.  

---

