<ol>
<li>Is the address deleted as soon as the funds it received as change are spent? </li>
</ol>

<p>No, the change address is not deleted but it is stored as another of your key pairs of your wallet. Bassically when you make a transaction with 1 BTC spending only 0.7 the remaining 0.3 BTC is send to <strong>new address</strong> that is stored inside the client (current account) waiting for new transaction from operating "main" address to occur. </p>

<p>Try yourself list your addresses (after you spend input on one of your change addreses) with command: <strong>listaddressgroupings</strong></p>

<ol start="2">
<li>The client probably doesn't watch for any further sends to these addresses, right?</li>
</ol>

<p>No, the client updates the balance on <strong>all keys</strong> inside the client. The change address can receive and sends BTC. The remaining funds will be updated as part of the main bitcoin address.</p>

<p>For more information see: <a href="https://en.bitcoin.it/wiki/Change" rel="nofollow">Change on Bitcoin wiki</a></p>

CC BY-SA 3.0
2015-01-14T17:22:03.290Z
If funds are sent to a change address, with the client show it in the GUI even though it doesn't show change addresses in the GUI by default?
morsecoder
CC BY-SA 3.0
2015-01-14T17:25:45.380Z
@StephenM347: I would assume that it only hides change transactions, which are identified by both the sending and receiving key being its own.
Murch
CC BY-SA 3.0
2015-01-14T17:28:39.083Z
@StephenM347 Balance shown in the GUI is for all addresses (key pairs) in bitcoin client. If funds are send to change address the balance in GUI will be updated accordingly.
Marek
CC BY-SA 3.0
2015-01-20T21:06:37.923Z
Then what's the point of making a distinction between change addresses and regular addresses? Seems like we should just be marking specific outputs as change outputs, rather than addresses.
morsecoder
CC BY-SA 3.0
2015-01-14T16:59:53.953Z
2015-01-14T17:26:20.627Z
2015-01-14T17:26:20.627Z
Marek
<p><strong>Change addresses are no different than other addresses, except that they do not get shown in the UI, i.e. they are not visible in the recent transactions column. Just like all other addresses they will be checked for new balances whenever a new block is added to the database.</strong></p>

<p>BitcoinCore keeps a number of unused addresses on hand of the size of <code>keypool</code>. The standard setting is 100 keys.</p>

<p>Whenever you create a transaction that doesn't spend a previous UTXO completely, the change gets sent to one of the previously unused addresses in the keypool, and a new address gets generated in the back of the keypool, to keep the number of unused addresses constant.</p>

<p>Likewise, when you request a "new receiving address" the first unused address from the <code>keypool</code> is popped, and a new one is generated and pushed in the back.</p>

<p>Even before the addresses are visible, the addresses are stored in the <code>wallet.dat</code> allowing you to create backups only every once in a while. (Well, you should at least every <code>keypool</code> transactions.)</p>

<p>Note: The keypool will only be refilled if the wallet is unlocked.</p>

CC BY-SA 3.0
2015-01-14T16:31:48.257Z
Are they checked for any further receiving of bitcoin on those addresses?
morsecoder
CC BY-SA 3.0
2015-01-14T16:32:19.523Z
Sure, why not? After you use them to send, somebody could send money back to you there.
Murch
CC BY-SA 3.0
2015-01-14T16:33:27.967Z
I'm currently looking for a source to confirm, but anything else would completely surprise me.
Murch
CC BY-SA 3.0
2015-01-14T16:44:31.380Z
At least they seem to get listed after sending money from them as suggested by this answer to [How to get all addresses - including the "change" addresses – from bitcoind?](http://bitcoin.stackexchange.com/a/9262/5406)
Murch
CC BY-SA 3.0
2015-01-14T16:27:54.330Z
2015-05-04T14:16:20.083Z
2015-05-04T14:16:20.083Z
Murch
<p>I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.</p>
<p>Here is the github link:</p>
<p><a href="https://github.com/ORP967/Bitcoin_Core_RPC_par_address" rel="nofollow noreferrer">https://github.com/ORP967/Bitcoin_Core_RPC_par_address</a></p>
<p>Let me know what you think or if you have any improvements you might have.</p>

CC BY-SA 4.0
2022-01-23T23:19:04.340Z
2022-01-23T23:19:04.340Z
ORP967
<p>I understand the reasons for wanting to use new change address for each transaction, but am unsure as to how they are treated by the Bitcoin core client. </p>

<ol>
<li>Is the address deleted as soon as the funds it received as change are spent?</li>
<li>The client probably doesn't watch for any further sends to these addresses, right?</li>
</ol>

CC BY-SA 3.0
2015-01-14T16:33:21.523Z
`Is the address deleted` Since it's possible to back up the wallet's keypool, it doesn't seem like the client could know for sure that it never gave that address out as a receiving address.
Nick ODell
<change><bitcoin-core-development>
How are change addresses treated differently by Bitcoin Core?
morsecoder
# How are change addresses treated differently by Bitcoin Core?

(Asked by: username_0 on 2015-01-14)

I understand the reasons for wanting to use new change address for each transaction, but am unsure as to how they are treated by the Bitcoin core client.

1. Is the address deleted as soon as the funds it received as change are spent?
2. The client probably doesn't watch for any further sends to these addresses, right?

**Tags:** change, bitcoin-core-development

> **Comments:**
> **username_1**: `Is the address deleted` Since it's possible to back up the wallet's keypool, it doesn't seem like the client could know for sure that it never gave that address out as a receiving address.  

---

## 3 answers

### Answer by username_2 on 2015-01-14. Score: 3 | Accepted answer

1. Is the address deleted as soon as the funds it received as change are spent?

No, the change address is not deleted but it is stored as another of your key pairs of your wallet. Bassically when you make a transaction with 1 BTC spending only 0.7 the remaining 0.3 BTC is send to **new address** that is stored inside the client (current account) waiting for new transaction from operating "main" address to occur.

Try yourself list your addresses (after you spend input on one of your change addreses) with command: **listaddressgroupings**

2. The client probably doesn't watch for any further sends to these addresses, right?

No, the client updates the balance on **all keys** inside the client. The change address can receive and sends BTC. The remaining funds will be updated as part of the main bitcoin address.

For more information see: [Change on Bitcoin wiki](https://en.bitcoin.it/wiki/Change)

> **Comments:**
> **username_0**: If funds are sent to a change address, with the client show it in the GUI even though it doesn't show change addresses in the GUI by default?  
> **username_3**: @StephenM347: I would assume that it only hides change transactions, which are identified by both the sending and receiving key being its own.  
> **username_2**: @StephenM347 Balance shown in the GUI is for all addresses (key pairs) in bitcoin client. If funds are send to change address the balance in GUI will be updated accordingly.  
> **username_0**: Then what's the point of making a distinction between change addresses and regular addresses? Seems like we should just be marking specific outputs as change outputs, rather than addresses.  

---

### Answer by username_3 on 2015-01-14. Score: 1

**Change addresses are no different than other addresses, except that they do not get shown in the UI, i.e. they are not visible in the recent transactions column. Just like all other addresses they will be checked for new balances whenever a new block is added to the database.**

BitcoinCore keeps a number of unused addresses on hand of the size of `keypool`. The standard setting is 100 keys.

Whenever you create a transaction that doesn't spend a previous UTXO completely, the change gets sent to one of the previously unused addresses in the keypool, and a new address gets generated in the back of the keypool, to keep the number of unused addresses constant.

Likewise, when you request a "new receiving address" the first unused address from the `keypool` is popped, and a new one is generated and pushed in the back.

Even before the addresses are visible, the addresses are stored in the `wallet.dat` allowing you to create backups only every once in a while. (Well, you should at least every `keypool` transactions.)

Note: The keypool will only be refilled if the wallet is unlocked.

> **Comments:**
> **username_0**: Are they checked for any further receiving of bitcoin on those addresses?  
> **username_3**: Sure, why not? After you use them to send, somebody could send money back to you there.  
> **username_3**: I'm currently looking for a source to confirm, but anything else would completely surprise me.  
> **username_3**: At least they seem to get listed after sending money from them as suggested by this answer to [How to get all addresses - including the "change" addresses – from bitcoind?](http://bitcoin.stackexchange.com/a/9262/5406)  

---

### Answer by username_4 on 2022-01-23. Score: 0

I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.

Here is the github link:

<https://github.com/username_4/Bitcoin_Core_RPC_par_address>

Let me know what you think or if you have any improvements you might have.


---

