Why are change addresses not associated with an account in your wallet?

2

From what I understand change addresses are automatically generated when you use sendtoaddress but what I don't understand is why these change addresses don't become automatically associated with the sending account. What is the reason for this?

absolutelyNoWarranty

Posted 2015-08-12T08:29:01.860

Reputation: 123

I'll have to double check, but I believe they're assigned to the default account, which is none or ""Wizard Of Ozzie 2015-08-12T09:16:35.297

Answers

5

Bitcoin Core's wallet interprets Bitcoin transactions as payments. A payment is sending money from one entity to another, and is independent from what exact coins were sent and how much change was given back.

When you have a transaction which spends a coin of yours A, and sends it to addresses X and Y, with X being an address of yours, the payment is assumed to have amount A - (value of coin sent to X), and to be going to Y.

X is not associated with an account because the software does not expect payments to it, only a single transaction output which is a low-level detail of how one particular payment occurred.

That said, because of this, and various other confusing parts of the accounts system and their inability to be used in a best practices way, they are deprecated and will be reduced to just address labels in a future version.

Pieter Wuille

Posted 2015-08-12T08:29:01.860

Reputation: 54 032